Skip to content

gerow/go-color

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

Package color implements some simple RGB/HSL color conversions for golang.

Adapted from
http://code.google.com/p/closure-library/source/browse/trunk/closure/goog/color/color.js
and algorithms on easyrgb.com.

To maintain accuracy between conversions we use floats in the color types.
If you are storing lots of colors and care about memory use you might want
to use something based on byte types instead.

Also, color types don't verify their validity before converting. If you do
something like RGB{10,20,30}.ToHSL() the results will be undefined. All
values must be between 0 and 1.

By Brandon Thomson

About

HSL/RGB conversion for golang

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages