ALL


  Python: calculate lighter/darker RGB colors

Many times color palettes have lighter and darker variations of the same color. This may be used to convey relative importance, or for something as simple as a gradient. Usually the designer will specify both colors. However, if you have a site that needs to allow user configurable styling, you may not want to ask the user for two variations of the same color.Here is some Python code to take a single color in RGB, and output an artitrarily lighter or darker variation of the same color. You could wrap this in a filter and use it right in your Django templates.view plainprint?def color_vari...

8,139 0       PYTHON RGC COLOR CALUCALTION LIGHTER/DARKER