X-Git-Url: https://git.ktnx.net/?p=mobile-ledger.git;a=blobdiff_plain;f=tools%2Fgen-styles;fp=tools%2Fgen-styles;h=19c420a45476a30ee32fa51c1733049df61a0fea;hp=21388fe3826d57338a9f9997a82171c27626e42f;hb=ee37227040bef9cae98cce2aada288c3a55b9781;hpb=18da610bd4e67f9d891a2511a6ae74708921afd9 diff --git a/tools/gen-styles b/tools/gen-styles index 21388fe3..19c420a4 100644 --- a/tools/gen-styles +++ b/tools/gen-styles @@ -176,11 +176,16 @@ sub hslStyleForHue { my $blueL = 0.665; my $yellowL = 0.350; + my $blueL2 = 0.350; + my $yellowL2 = 0.500; + + # $y == 0 for yellow my $y = $hue - 60; $y += 360 if $y < 0; + # $q == 0 for yellow, 1 for blue my $q = cos(deg2rad(abs($y-180)/2.0)); my $l1 = $yellowL + ($blueL - $yellowL) * $q; - my $l2 = 0.150 + 0.350 * $q; + my $l2 = 0.250 + 0.250 * $q; my $l3 = 0.950; my $l4 = 0.980;