solarized-emacs

a fork of Bozhidar Batsov's solarized-emacs
git clone https://git.trogloxene.org/solarized-emacs.git
Log | Files | Refs | README

commit 5f90a10743265988fa80fcc2edf6c400abddd7de
parent 660b03d246f7a6929d94143fbc56af86f6e40b1f
Author: Thomas Frössman <thomasf@jossystem.se>
Date:   Sun, 17 Nov 2019 16:51:38 +0100

colorlab: remove unused function

Diffstat:
Mcolorlab/main.go | 66------------------------------------------------------------------
1 file changed, 0 insertions(+), 66 deletions(-)

diff --git a/colorlab/main.go b/colorlab/main.go @@ -225,72 +225,6 @@ func createComplementaryColors(sol Solarized, blendBg, blendFg, gamma float64) ( return NewAccents(bgs), NewAccents(fgs) } -func createComplementaryColorsPrev(sol Solarized, blendBg, blendFg float64) (accentBgs, accentFgs Accents) { - sol = sol.Clone() - cs := sol.Accents.Colors() - - light := func(c colorful.Color) float64 { - l, _, _ := c.Lab() - return l - } - var bgs, fgs [8]colorful.Color - for idx, v := range cs { - fmt.Println(" ") - bg := v.BlendLab(sol.Base03.Color(), blendBg) - fg := v.BlendLab(sol.Base0.Color(), blendFg) - - { - l, _, _ := sol.Base03.Color().Lab() - fmt.Printf(" | b1 %.2f %s", l, sol.Base03) - } - - { - l, _, _ := sol.Base0.Color().Lab() - fmt.Printf(" f1 %.2f %s", l, sol.Base0) - } - - lFg := light(sol.Base0.Color()) - lBg := light(sol.Base03.Color()) - - lc := lFg - lBg - fmt.Printf(" lc %.2f", lc) - bl, ba, bb := bg.Lab() - fl, fa, fb := fg.Lab() - - fmt.Printf(" | b2 %.2f %s", bl, bg.Clamped().Hex()) - fmt.Printf(" f2 %.2f %s", fl, fg.Clamped().Hex()) - fmt.Printf(" lc %.2f", fl-bl) - - // nlb := bl + (fl-bl)*0.5 + lc*0.5 - // nlf := bl + (fl-bl)*0.5 - lc*0.5 - // nlf := lFg - // nlb := lBg - - nlb := bl - nlf := fl - if bl < fl { - nlb = nlb + 0.01 - nlf = nlf + 0.01 - } else { - nlb = nlb - 0.01 - nlf = nlf - 0.01 - } - - fg = colorful.Lab(nlf, fa, fb) - bg = colorful.Lab(nlb, ba, bb) - - fmt.Printf(" | b3 %.2f %s", nlb, bg.Clamped().Hex()) - fmt.Printf(" f3 %.2f %s", nlf, fg.Clamped().Hex()) - fmt.Printf(" lc %.2f", nlf-nlb) - - bgs[idx] = bg - fgs[idx] = fg - - } - fmt.Println("\n\n") - return NewAccents(bgs), NewAccents(fgs) -} - type Solarized struct { Base Accents