Skip to content

Commit

Permalink
V5.0 (#5)
Browse files Browse the repository at this point in the history
* Added first version of farger_color_names.inc

This is based on the massive list of colors located at https://github.com/meodai/color-names, release v7.30.0, that contains 27351 unique color names.

* Update farger.inc

* Update README.md

Described the new farger_color_names.inc file

* Update README.md

Added a TODO list

* Update README.md

* Update README.md

* Update README.md

* HTML documentation file for farger_color_names.inc

Added the newly created HTML documentation file for farger_color_names.inc

* Update index.html

Added link to the meodai/color-names HTML file

* Update README.md

Added some text about the conversion of color identifiers to make them acceptable for POV-Ray

* Update README.md
  • Loading branch information
SvenErik1968 authored Jan 2, 2021
1 parent 1fc4798 commit 7a8a203
Show file tree
Hide file tree
Showing 5 changed files with 27,417 additions and 20 deletions.
1 change: 1 addition & 0 deletions Documentation/farger_color_names.html

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion Documentation/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ <h1>Farger.inc documentation</h1>
<li><a href="farger_ams595.html">AMS Standard 595 colors</a></li>
<li><a href="Farger_PC.html">Pant... colors</a></li>
<li><a href="Farger_ColorMine.html">ColorMine.org colors</a></li>
<li><a href="farger_color_names.html">meodai/color-names colors</a></li>
</ul>
</body>
</html>
</html>
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@ In addition, there are separate include files for colors from:
- *Farger_PC.inc* - This is an extended include file with color definitions from a trademarked and proprietary color space system. It is based on the list of colors found on a webpage that now has disappeared; the owner of that brand/trademark is known for _vigourlysly_ defending it, so I will probably remove this file in a later version.
- [*ColorMine.org - Colors by Name*](http://colormine.org/colors-by-name)

## New in v5.0
A **_large_** include file with currently **27351** named unique colors have been added based on the [meodai/color-names](https://github.com/meodai/color-names) collection. It is not included by default, but you can change a value in [farger.inc](./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.

## _Tips:_ [*ColorMine* POV-Ray macro library](https://github.com/mjhorvath/ColorMine) ##
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`](https://github.com/POV-Ray/povray/blob/master/distribution/include/colors.inc).
- Included conversion macros:
Expand All @@ -42,3 +47,8 @@ Michael Horvath's (mjhorvath) POV-Ray macro library with many macroes to work wi

## Simple documentation
In the [_Documentation_](./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
- [X] Create an include file based on the meodai/color-names collection ([Issue 4](https://github.com/SvenErik1968/Farger.inc/issues/4#issue-716782026))
- [X] Create a documentation HTML-file for the new farger_color_names.inc

48 changes: 29 additions & 19 deletions farger.inc
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
// Persistence of Vision Ray Tracer Include File
//
// File : farger.inc
// Version : 4.1
// Version : 5.0
// Created by : Sven-Erik Andersen
// Contact : [email protected]
// Created date : 2014-06-22
// Last updated : 2020-07-27
// Last updated : 2021-01-02
// Repository : https://github.com/SvenErik1968/Farger.inc/
// Description : Farger means colors in Norwegian.
//
Expand Down Expand Up @@ -42,32 +42,42 @@
// with many macroes to work with and convert colors
// made by Michael Horvath (mjhorvath) based on code from ColorMine.org
//
// It now also includes a massive include file based on the large list of named colors
// located at https://github.com/meodai/color-names
// This file that currently contains 27351 named colors are not included by default;
// if you want to use it, set Include_Meodai below to true, the other files will then
// not be included. The defined colors in this file have not been compared with the ones
// in colors.inc.

#ifndef(farger_Inc_Temp)
#declare farger_Inc_Temp = version;
#version 3.7;

// Where the color definition is the same as in the POV-Ray color.inc include file,
// the color name will point to the POV-Ray color definition,
// so we need to make sure that file is included
#ifndef(Colors_Inc_Temp)
#include "colors.inc"
#end
#declare Include_Meodai = false;

#ifdef(View_POV_Include_Stack)
#debug "including farger.inc\n"
#end

// Comment out the include files you don't need
#include "farger_f.inc" // Include this if you want the named colors
#include "farger_crayola.inc" // Include this if you want the Crayola colors
#include "farger_html_x11.inc" // Include this if you want the HTML and X11 named colors
#include "farger_lego.inc" // Include this if you want the Lego colors
#include "farger_Xona.inc" // Include this if you want the Xona.com colors
#include "farger_ral_classic.inc" // Include this if you want the RAL Classic colors
#include "farger_ams595.inc" // Include this if you want the AMS Standard 595 colors
#include "Farger_PC.inc" // Include this if you want the Pant... colors
#include "farger_ColorMine.inc" // Include this if you want the ColorMine colors

#if (Include_Meodai)
#include "farger_color_names.inc"
#else
// Where the color definition is the same as in the POV-Ray color.inc include file,
// the color name will point to the POV-Ray color definition,
// so we need to make sure that file is included
#ifndef(Colors_Inc_Temp)
#include "colors.inc"
#end
// Comment out the include files you don't need
#include "farger_f.inc" // Include this if you want the named colors
#include "farger_crayola.inc" // Include this if you want the Crayola colors
#include "farger_html_x11.inc" // Include this if you want the HTML and X11 named colors
#include "farger_lego.inc" // Include this if you want the Lego colors
#include "farger_Xona.inc" // Include this if you want the Xona.com colors
#include "farger_ral_classic.inc" // Include this if you want the RAL Classic colors
#include "farger_ams595.inc" // Include this if you want the AMS Standard 595 colors
#include "Farger_PC.inc" // Include this if you want the Pant... colors
#include "farger_ColorMine.inc" // Include this if you want the ColorMine colors
#end
#version farger_Inc_Temp;
#end
Loading

0 comments on commit 7a8a203

Please sign in to comment.