{ "info": { "author": "Mike Spindel", "author_email": "mike@spindel.is", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Natural Language :: English", "Programming Language :: Python" ], "description": "=============================================\n Palette - Easy Color Manipulation in Python\n=============================================\n\n:Authors:\n Mike Spindel\n:Version: 0.2\n\nPalette makes it easy to perform simple operations on colors and to\nconvert between different color systems and representations.\n\n\nSample Usage\n============\n\nInitialize a color object using whatever representation is convenient::\n\n >>> c = Color(\"#0a0bcc\")\n >>> c = Color.from_rgb(255, 255, 255, a=0.5)\n >>> c = Color(hls=(0.2, 0.1, 0.1))\n\nManipulate colors::\n\n >>> a = Color(\"#aaaa00\")\n >>> a.lighter()\n >>> a.darker(amt=0.4)\n\nMeasure Colors::\n\n >>> a = Color(\"#aaaa00\")\n >>> b = Color(\"#000000\")\n >>> a.w3_contrast_ratio(b)\n >>> a.w3_contrast_test(b)\n >>> a.luminance\n\nConvert Representations::\n\n >>> a = Color(\"#aaaa00\")\n >>> a.rgb8.r\n 170\n >>> a.rgb8.r = 30\n >>> tuple(a.rgb8)\n (30.0, 170.0, 0.0)\n >>> tuple(a.hls)\n (0.30392156862745096, 0.3333333333333333, 1.0)\n >>> str(a.hls)\n 'hls(0.30392156862745096, 0.3333333333333333, 1.0)'\n >>> a.hex\n '#1eaa00'\n >>> a.css\n 'rgb(170, 170, 0)'\n\nConvert sRGB::\n\n >>> a = Color(\"#aaaa00\")\n >>> a.workspace\n \"srgb\"\n >>> a.rgb == a.srgb\n True\n >>> a.linear_rgb\n {'r': 0.4019777798321958, 'b': 0.0, 'g': 0.4019777798321958}\n >>> a.linear_rgb = (.2, .3, .3)\n >>> a.rgb\n (0.48452920448170694, 0.5838314900602575, 0.5838314900602575)\n\n\nWhere Does Palette Fit In?\n==========================\n\nThere already exist several good python libraries for manipulating\ncolor. Perhaps the two most notable are Grapefruit and\npython-colormath. Palette hopes to fill a niche somewhere between the\ntwo.\n\nWith respect to grapefruit, palette intends to have:\n\n- a simpler interface for common tasks\n- more sophistication with respect to RGB working spaces, illuminants,\n etc.\n- PEP-8 compliance\n\nWith respect to python-colormath, palette intends to have:\n\n- a simpler interface for common tasks; potentially at the expense of\n deep support for non-RGB colors.\n- more utilities that are primarily useful for web development\n- support for *fewer* colorspaces. Palette isn't particularly\n interested in completionism.\n- no dependency on numpy", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://github.com/deactivated/palette", "keywords": "color colorspace rgb hls hsl", "license": "MIT", "maintainer": null, "maintainer_email": null, "name": "palette", "package_url": "https://pypi.org/project/palette/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/palette/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://github.com/deactivated/palette" }, "release_url": "https://pypi.org/project/palette/0.2/", "requires_dist": null, "requires_python": null, "summary": "Easy color manipulation for Python.", "version": "0.2" }, "last_serial": 749338, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "dcaf23fbb3f98b1ab0358c07831aff5a", "sha256": "6ee092a58604e181bf36c59edf5a08dc608be36b2ae7fe68f90740d565d0c82a" }, "downloads": -1, "filename": "palette-0.1.zip", "has_sig": false, "md5_digest": "dcaf23fbb3f98b1ab0358c07831aff5a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5998, "upload_time": "2011-06-20T20:29:37", "url": "https://files.pythonhosted.org/packages/b9/d6/1f1330326b7f2f8de3198fcf89ff09afe9167b0f2070400de65ae42c67aa/palette-0.1.zip" } ], "0.2": [ { "comment_text": "", "digests": { "md5": "0cf2b2757923f3baec490ecf530a235a", "sha256": "82e28a008b686594b6dd9ee9d6d7d9e7c81ded224b5acccc74a799abc72cf10f" }, "downloads": -1, "filename": "palette-0.2.tar.gz", "has_sig": false, "md5_digest": "0cf2b2757923f3baec490ecf530a235a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5581, "upload_time": "2012-05-31T06:14:08", "url": "https://files.pythonhosted.org/packages/e8/2f/fd242288bcc7d98c829b61b3a281e8562d3bc14c409bae87e1d1cbb32b87/palette-0.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "0cf2b2757923f3baec490ecf530a235a", "sha256": "82e28a008b686594b6dd9ee9d6d7d9e7c81ded224b5acccc74a799abc72cf10f" }, "downloads": -1, "filename": "palette-0.2.tar.gz", "has_sig": false, "md5_digest": "0cf2b2757923f3baec490ecf530a235a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5581, "upload_time": "2012-05-31T06:14:08", "url": "https://files.pythonhosted.org/packages/e8/2f/fd242288bcc7d98c829b61b3a281e8562d3bc14c409bae87e1d1cbb32b87/palette-0.2.tar.gz" } ] }