defColor

Difference between version 3 and 4 - Previous - Next
[JayBy] 2016-05-30

`defColor` provides procedures for color definitions, like ...
   * Tint and mix colors
   * Translate colors to #HHEEXX format
   * Search nearest name of given color
   * Takes care of additional 'SystemColors' on windows

`defColor` uses only RGB values for calculation.

** Download **

   Version 0.3:   [http://download.lima-city.de/lifax/defColor-0.3.zip%|%defColor-0.3.zip%|%]

** Usage **

`package require defColor ?0.3?`

COMMANDS

   `::defColor::reverse <Color1> <Color2>`:   Reverse Colors<<br>>Output: [list <Color2> <Color1>]

   `::defColor::mix <BaseColor> ?<MixColor>? ?<MixValue>?`:   Mix <BaseColor> with <MixColor> with the strength of        <MixValue> (0-100).<<br>>Defaults: <MixColor> defaults to black or white depending of Brightness of <BaseColor>. <MixValue> defaults to 50.<<br>>Output: <HexColor>

   `::defColor::tint <Color> ?<TintValue>?`:   Create lighter and darker color from given color with the strength of <TintValue> (0-100).<<br>>Defaults: <TintValue> defaults to 50.<<br>>Output: [list <LighterColor> <DarkerColor>]

   `::defColor::crFore <BackColor>`:   Set black or white <ForeColor> depending of <BackColor><<br>>Output: <ForeColor>

   `::defColor::luminance <Color>`:   Calculate brightness level.<<br>>Output: <Percent>

   `::defColor::nearestName <Color>`:   Search nearest <ColorName> of <Color><<br>>Output: [list <ColorName> <Differenz>]

   Internal Helpers:   ::defColor::conv2List <Color><<br>>::defColor::conv2Hex <Color><<br>>::defColor::list2Hex [list R G B]<<br>>::defColor::conv2Perc <Color>

   Old, for compatibility:   ::defColor::isBright <Color><<br>>::defColor::brightLevel <Color><<br>>::defColor::listNames<<br>>::defColor::validate <Color>

VARIABLES

   `::defColor::ColorNames`:   List of all known color names, which comes from the builtin 'rgb.txt'. Each color definition is a sublist like [list <Red> <Green> <Blue> <Name> <RGB-Sum>].



----
'''[Siqsuruq] - 2016-05-30 16:51:17'''

Link is not working.

[JayBy] Now it should work!
[APE] - 2020-01-17

Link not working, finally found it in http://chiselapp.com/user/aspect/repository/tcl-hacks/artifact/b7205a7967c8c6f9

<<categories>> GUI