picker getting closer....
This commit is contained in:
parent
023f1651f8
commit
537b430224
20 changed files with 179 additions and 100 deletions
|
@ -2,7 +2,6 @@ package utils
|
|||
|
||||
import (
|
||||
"fmt"
|
||||
"log"
|
||||
"math"
|
||||
)
|
||||
|
||||
|
@ -43,7 +42,7 @@ func AltColor(r, g, b uint8) (uint8, uint8, uint8) {
|
|||
l2 := Luminance(r2, g2, b2)
|
||||
ratio := WCAGRatio(l1, l2)
|
||||
|
||||
log.Printf("isDark=%v, ratio: %f, l1(%f)=%s, l2(%f)=%s", isDark, ratio, l1, RgbToString(r, g, b), l2, RgbToString(r2, g2, b2))
|
||||
// log.Printf("isDark=%v, ratio: %f, l1(%f)=%s, l2(%f)=%s", isDark, ratio, l1, RgbToString(r, g, b), l2, RgbToString(r2, g2, b2))
|
||||
|
||||
if ratio >= 3 {
|
||||
return r2, g2, b2
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue