Skip to content

SvenErik1968/Farger.inc

Repository files navigation

POV-Ray version

Latest release Open issues Last commit License

Farger.inc

Farger is the plural form of the Norwegian word farge that means color.

This is an extended set of POV-Ray include files with, at the moment, 6568 named color definitions. In the master file, farger.inc, you can comment out the include-files you don't need.

It is mostly based on the Wikipedia list of colors that you can find at: Lists of colors in addition to Encycolorpedia.

In addition, there are separate include files for colors from:

New in v5.0

A large include file with currently 27351 named unique colors have been added based on the meodai/color-names collection. It is not included by default, but you can change a value in farger.inc to include it, the other files will then not be loaded since most of the sources for the other files are also used in the meodai/color-names collection.

In order to generate "safe" color identifiers, some automatic conversion of the names is done to remove various non-ASCII, UNICODE and punctuation symbols.

Michael Horvath's (mjhorvath) POV-Ray macro library with many macroes to work with and convert colors based on code from ColorMine.org that complements (and partially duplicate) the macros from Colors.inc.

  • Included conversion macros:
    • CLCH2LAB - CIE LCH to CIE L*a*b*
    • CLAB2XYZ - CIE L*a*b* to CIE 1931 XYZ
    • CXYZ2RGB - CIE 1931 XYZ to RGB (Same macro-name as in Colors.inc)
    • CLUV2XYZ - CIELUV to CIE 1931 XYZ
    • CHCL2LUV - HSL to CIE LUV
    • CRGB2HEX - RGB vector (0 to 1) to HEX
    • CDEC2HEX - Decimal (0 to 1) to HEX
    • CXYZ2XYY - CIE 1931 XYZ to CIE xyY
    • CXYZ2LAB - CIE 1931 XYZ to CIE L*a*b*
    • CXYY2XYZ - CIE xyY to CIE 1931 XYZ
    • CLAB2LCH - CIE L*a*b* to CIE LCH
    • CLUV2HCL - CIELUV to HCL

Simple documentation

In the Documentation folder, you will find a set of HTML-files (one for each of the include-files) that contain a simple table showing the color name, the RGB hex color code, a color sample, and a button that will copy the color name to the clipboard.

TODO

  • Create an include file based on the meodai/color-names collection (Issue 4)
  • Create a documentation HTML-file for the new farger_color_names.inc