diff --git a/.gitignore b/.gitignore index 9aff648..67e37bb 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,7 @@ NOTES.md *.png *.gif didder +didder-* !david_dithered.png diff --git a/README.md b/README.md index d652e81..efb6cf9 100644 --- a/README.md +++ b/README.md @@ -32,7 +32,8 @@ It is backed by my [dithering library](https://github.com/makeworld-the-better-o More methods of dithering are being worked on, such as Riemersma, Yuliluoma, and blue noise. If you'd like to help out with development of those methods, or request a new one, please make an issue in my [dither](https://github.com/makeworld-the-better-one/dither) library repo, not this one. ## Features -- Set palette using hex codes, number 0-255 (grayscale), or SVG color names +- Set palette using hex codes, number 0-255 (grayscale), or [SVG color names](https://www.w3.org/TR/SVG11/types.html#ColorKeywords) + - All colors are interpreted in the sRGB colorspace - Optionally recolor image with a different palette after dithering - Set dithering strength - Image is automatically converted to grayscale if palette is grayscale diff --git a/main.go b/main.go index a6aeb90..e0dd7ff 100644 --- a/main.go +++ b/main.go @@ -34,7 +34,9 @@ Colors (for --palette and --recolor) are entered as a single quoted argument. They can be separated by spaces and commas. Colors can be formatted as hex codes (case-insensitive, with or without the '#'), a single number from 0-255 for grayscale, or a color name from the SVG 1.1 spec (aka the HTML or W3C -color names). +color names). All colors are interpreted in the sRGB colorspace. + +Color names: https://www.w3.org/TR/SVG11/types.html#ColorKeywords Images are converted to grayscale automatically if the palette is grayscale. This produces more correct results.