Skip to content

Commit

Permalink
Add comment mentioning FAQ to Lab/Luv/Hcl functions.
Browse files Browse the repository at this point in the history
This was suggested in #14
  • Loading branch information
lucasb-eyer committed Aug 29, 2017
1 parent d274845 commit 951b86a
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions colors.go
Original file line number Diff line number Diff line change
Expand Up @@ -546,6 +546,8 @@ func (col Color) LabWhiteRef(wref [3]float64) (l, a, b float64) {
}

// Generates a color by using data given in CIE L*a*b* space using D65 as reference white.
// WARNING: many combinations of `l`, `a`, and `b` values do not have corresponding
// valid RGB values, check the FAQ in the README if you're unsure.
func Lab(l, a, b float64) Color {
return Xyz(LabToXyz(l, a, b))
}
Expand Down Expand Up @@ -695,6 +697,8 @@ func (col Color) LuvWhiteRef(wref [3]float64) (l, u, v float64) {

// Generates a color by using data given in CIE L*u*v* space using D65 as reference white.
// L* is in [0..1] and both u* and v* are in about [-1..1]
// WARNING: many combinations of `l`, `a`, and `b` values do not have corresponding
// valid RGB values, check the FAQ in the README if you're unsure.
func Luv(l, u, v float64) Color {
return Xyz(LuvToXyz(l, u, v))
}
Expand Down Expand Up @@ -760,6 +764,8 @@ func (col Color) HclWhiteRef(wref [3]float64) (h, c, l float64) {

// Generates a color by using data given in HCL space using D65 as reference white.
// H values are in [0..360], C and L values are in [0..1]
// WARNING: many combinations of `l`, `a`, and `b` values do not have corresponding
// valid RGB values, check the FAQ in the README if you're unsure.
func Hcl(h, c, l float64) Color {
return HclWhiteRef(h, c, l, D65)
}
Expand Down

0 comments on commit 951b86a

Please sign in to comment.