aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJon Lund Steffensen <jonlst@gmail.com>2013-10-21 22:30:09 -0400
committerJon Lund Steffensen <jonlst@gmail.com>2013-10-21 22:52:38 -0400
commit070bf1d3de78c208cbb8a393b08396bbd867e903 (patch)
treea7da088ca083a3db923494a9b87b0846572ea57b
parentUpdate HACKING document (diff)
downloadredshift-ng-070bf1d3de78c208cbb8a393b08396bbd867e903.tar.gz
redshift-ng-070bf1d3de78c208cbb8a393b08396bbd867e903.tar.bz2
redshift-ng-070bf1d3de78c208cbb8a393b08396bbd867e903.tar.xz
colorramp: Use new color ramp table provided by Ingo Thies.
This table is calculated by the actual Planckian locus below 5000K, and by CIE daylight standard above 5000K. Also, the new table applies proper gamma correction according to sRGB. More information can be found in README-colorramp.
-rw-r--r--README-colorramp296
-rw-r--r--src/colorramp.c342
-rw-r--r--src/redshift.c12
3 files changed, 550 insertions, 100 deletions
diff --git a/README-colorramp b/README-colorramp
new file mode 100644
index 0000000..9743c35
--- /dev/null
+++ b/README-colorramp
@@ -0,0 +1,296 @@
+Updated color ramp calculation in Redshift 1.9
+==============================================
+
+Ingo Thies, 2013
+
+
+The original version of Redshift uses an RGB table from
+
+http://www.vendian.org/mncharity/dir3/blackbody/UnstableURLs/bbr_color.html
+
+which contains x,y chromaticities as well as decimal and integer/hex RGB data.
+Unfortunately, the decimal values used for Redshift are not gamma-corrected
+while the others are. The gamma correction is part of the sRGB specifications
+and is described in detail at http://en.wikipedia.org/wiki/SRGB. It can roughly
+be approximated by a power law with an exponent gamma about 2.2. Omitting this
+correction results in exaggerated color values. A minor issue concerns the
+standard whitepoints which are slightly off the Planckian locus. In particular,
+D65 (which corresponds to maximized RGB=1,1,1 in sRGB) contains slightly more
+green than 6500 K blackbody color. The developers of Redshift solved this by
+rescaling the RGB values to match 1,1,1 at 6500 K. This, however, leads to
+slightly incorrect colors.
+
+The corrected color ramp is calculated by the actual Planckian locus below 5000
+kelvins and CIE daylight standard above with an interpolation between these
+limits. The x,y chromaticities are calculated by using the method described
+in
+
+http://en.wikipedia.org/wiki/Standard_illuminant#Illuminant_series_D
+
+for daylight and by integrating the CIE 1931 color-matching functions for the
+blackbody spectrum to obtain the Planckian locus. The advantage of using the
+D-type whitepoint is that D65 is already at RGB=1,1,1, so in principle no
+adjustment is required. In practice, minor deviations remain, mainly due to the
+fact that D65 is actually at 6504 K (a consequence of different values for the
+physical constants being used in the 1960's when D65 was defined) and also due
+to rounding issues. This is fixed by a slight adjustment of RGB which is
+negligible in practice.
+
+Below are the RGB, x,y and u,v values of the hybrid color ramp used here.
+Plots of x,y and u,v can be found in xy1931chart.png and uv1960chart.png. The
+Planckian locus is the smooth curve in the middle of the kelvin tics. The
+colorramp used in modified Redshift is the one shifting upwards above 5000 K.
+The official definition of the daylight locus extends down to 4000 K, including
+D55 and D50 standard illuminants. However, to my eyes the color tone looks more
+natural for color temperatures below 6500 K if switched back to Planckian. For
+this mere reason the curve shifts to Planckian already between 6500 and and
+5000 K rather than below 5000 K.
+
+Note that the color ramp ends at 25100 K instead of the intended maximum of
+25000 K. This is to avoid an array overflow in the interpolation procedure. In
+the original Redshift the max. value of 10000 K could never be used for this
+reason.
+
+ kelvins mireds RGB x,y u,v
+ 1000.00 1000.000 1.00000000 0.18172716 0.00000000 0.65273323 0.34447987 0.44797565 0.35462863
+ 1100.00 909.091 1.00000000 0.25503671 0.00000000 0.63873894 0.35651626 0.42577506 0.35647365
+ 1200.00 833.333 1.00000000 0.30942099 0.00000000 0.62502772 0.36747333 0.40588690 0.35795039
+ 1300.00 769.231 1.00000000 0.35357379 0.00000000 0.61161486 0.37725198 0.38809317 0.35907136
+ 1400.00 714.286 1.00000000 0.39091524 0.00000000 0.59850510 0.38580851 0.37216463 0.35985729
+ 1500.00 666.667 1.00000000 0.42322816 0.00000000 0.58570272 0.39314233 0.35788307 0.36033379
+ 1600.00 625.000 1.00000000 0.45159884 0.00000000 0.57321532 0.39928597 0.34505055 0.36052904
+ 1700.00 588.235 1.00000000 0.47675916 0.00000000 0.56105421 0.40429655 0.33349186 0.36047214
+ 1800.00 555.556 1.00000000 0.49923747 0.00000000 0.54923312 0.40824837 0.32305388 0.36019191
+ 1900.00 526.316 1.00000000 0.51943421 0.00000000 0.53776653 0.41122667 0.31360366 0.35971610
+ 2000.00 500.000 1.00000000 0.54360078 0.08679949 0.52666805 0.41332243 0.30502601 0.35907083
+ 2100.00 476.190 1.00000000 0.56618736 0.14065513 0.51594919 0.41462823 0.29722115 0.35828027
+ 2200.00 454.545 1.00000000 0.58734976 0.18362641 0.50561853 0.41523508 0.29010253 0.35736649
+ 2300.00 434.783 1.00000000 0.60724493 0.22137978 0.49568136 0.41523016 0.28359494 0.35634941
+ 2400.00 416.667 1.00000000 0.62600248 0.25591950 0.48613958 0.41469527 0.27763286 0.35524684
+ 2500.00 400.000 1.00000000 0.64373109 0.28819679 0.47699184 0.41370588 0.27215903 0.35407459
+ 2600.00 384.615 1.00000000 0.66052319 0.31873863 0.46823386 0.41233069 0.26712334 0.35284660
+ 2700.00 370.370 1.00000000 0.67645822 0.34786758 0.45985885 0.41063151 0.26248174 0.35157507
+ 2800.00 357.143 1.00000000 0.69160518 0.37579588 0.45185787 0.40866340 0.25819546 0.35027065
+ 2900.00 344.828 1.00000000 0.70602449 0.40267128 0.44422033 0.40647504 0.25423026 0.34894256
+ 3000.00 333.333 1.00000000 0.71976951 0.42860152 0.43693431 0.40410911 0.25055582 0.34759878
+ 3100.00 322.581 1.00000000 0.73288760 0.45366838 0.42998698 0.40160280 0.24714525 0.34624614
+ 3200.00 312.500 1.00000000 0.74542112 0.47793608 0.42336490 0.39898835 0.24397461 0.34489052
+ 3300.00 303.030 1.00000000 0.75740814 0.50145662 0.41705424 0.39629352 0.24102257 0.34353691
+ 3400.00 294.118 1.00000000 0.76888303 0.52427322 0.41104108 0.39354213 0.23827007 0.34218955
+ 3500.00 285.714 1.00000000 0.77987699 0.54642268 0.40531154 0.39075447 0.23570001 0.34085200
+ 3600.00 277.778 1.00000000 0.79041843 0.56793692 0.39985192 0.38794778 0.23329708 0.33952726
+ 3700.00 270.270 1.00000000 0.80053332 0.58884417 0.39464885 0.38513659 0.23104750 0.33821781
+ 3800.00 263.158 1.00000000 0.81024551 0.60916971 0.38968931 0.38233313 0.22893883 0.33692571
+ 3900.00 256.410 1.00000000 0.81957693 0.62893653 0.38496077 0.37954757 0.22695986 0.33565263
+ 4000.00 250.000 1.00000000 0.82854786 0.64816570 0.38045117 0.37678834 0.22510046 0.33439993
+ 4100.00 243.902 1.00000000 0.83717703 0.66687674 0.37614896 0.37406236 0.22335143 0.33316866
+ 4200.00 238.095 1.00000000 0.84548188 0.68508786 0.37204315 0.37137528 0.22170443 0.33195966
+ 4300.00 232.558 1.00000000 0.85347859 0.70281616 0.36812324 0.36873160 0.22015187 0.33077353
+ 4400.00 227.273 1.00000000 0.86118227 0.72007777 0.36437931 0.36613489 0.21868685 0.32961072
+ 4500.00 222.222 1.00000000 0.86860704 0.73688797 0.36080191 0.36358791 0.21730306 0.32847151
+ 4600.00 217.391 1.00000000 0.87576611 0.75326132 0.35738213 0.36109274 0.21599475 0.32735605
+ 4700.00 212.766 1.00000000 0.88267187 0.76921169 0.35411155 0.35865086 0.21475665 0.32626438
+ 4800.00 208.333 1.00000000 0.88933596 0.78475236 0.35098221 0.35626326 0.21358394 0.32519645
+ 4900.00 204.082 1.00000000 0.89576933 0.79989606 0.34798660 0.35393053 0.21247220 0.32415212
+ 5000.00 200.000 1.00000000 0.90198230 0.81465502 0.34511765 0.35165288 0.21141735 0.32313121
+ 5100.00 196.078 1.00000000 0.90963069 0.82838210 0.34241203 0.35001272 0.21021935 0.32232854
+ 5200.00 192.308 1.00000000 0.91710889 0.84190889 0.33979886 0.34839077 0.20907188 0.32153748
+ 5300.00 188.679 1.00000000 0.92441842 0.85523742 0.33727444 0.34678727 0.20797270 0.32075786
+ 5400.00 185.185 1.00000000 0.93156127 0.86836903 0.33483529 0.34520270 0.20691958 0.31998956
+ 5500.00 181.818 1.00000000 0.93853986 0.88130458 0.33247815 0.34363762 0.20591041 0.31923255
+ 5600.00 178.571 1.00000000 0.94535695 0.89404470 0.33019990 0.34209270 0.20494313 0.31848685
+ 5700.00 175.439 1.00000000 0.95201559 0.90658983 0.32799758 0.34056863 0.20401576 0.31775250
+ 5800.00 172.414 1.00000000 0.95851906 0.91894041 0.32586836 0.33906607 0.20312639 0.31702955
+ 5900.00 169.492 1.00000000 0.96487079 0.93109690 0.32380952 0.33758570 0.20227319 0.31631809
+ 6000.00 166.667 1.00000000 0.97107439 0.94305985 0.32181844 0.33612812 0.20145443 0.31561817
+ 6100.00 163.934 1.00000000 0.97713351 0.95482993 0.31989262 0.33469388 0.20066842 0.31492986
+ 6200.00 161.290 1.00000000 0.98305189 0.96640795 0.31802964 0.33328348 0.19991358 0.31425322
+ 6300.00 158.730 1.00000000 0.98883326 0.97779486 0.31622718 0.33189733 0.19918839 0.31358829
+ 6400.00 156.250 1.00000000 0.99448139 0.98899179 0.31448300 0.33053578 0.19849141 0.31293509
+ 6500.00 153.846 1.00000000 1.00000000 1.00000000 0.31279496 0.32919912 0.19782126 0.31229365
+ 6600.00 151.515 0.98947904 0.99348723 1.00000000 0.31120243 0.32761002 0.19730962 0.31156863
+ 6700.00 149.254 0.97940448 0.98722715 1.00000000 0.30966650 0.32606300 0.19681912 0.31086072
+ 6800.00 147.059 0.96975025 0.98120637 1.00000000 0.30818460 0.32455698 0.19634862 0.31016953
+ 6900.00 144.928 0.96049223 0.97541240 1.00000000 0.30675427 0.32309087 0.19589702 0.30949467
+ 7000.00 142.857 0.95160805 0.96983355 1.00000000 0.30537319 0.32166361 0.19546333 0.30883576
+ 7100.00 140.845 0.94303638 0.96443333 1.00000000 0.30403281 0.32026747 0.19504461 0.30818933
+ 7200.00 138.889 0.93480451 0.95923080 1.00000000 0.30273830 0.31890887 0.19464226 0.30755844
+ 7300.00 136.986 0.92689056 0.95421394 1.00000000 0.30148708 0.31758616 0.19425527 0.30694243
+ 7400.00 135.135 0.91927697 0.94937330 1.00000000 0.30027715 0.31629817 0.19388281 0.30634088
+ 7500.00 133.333 0.91194747 0.94470005 1.00000000 0.29910666 0.31504380 0.19352414 0.30575337
+ 7600.00 131.579 0.90488690 0.94018594 1.00000000 0.29797383 0.31382196 0.19317853 0.30517949
+ 7700.00 129.870 0.89808115 0.93582323 1.00000000 0.29687698 0.31263161 0.19284534 0.30461885
+ 7800.00 128.205 0.89151710 0.93160469 1.00000000 0.29581456 0.31147172 0.19252394 0.30407106
+ 7900.00 126.582 0.88518247 0.92752354 1.00000000 0.29478506 0.31034133 0.19221375 0.30353576
+ 8000.00 125.000 0.87906581 0.92357340 1.00000000 0.29378708 0.30923947 0.19191423 0.30301259
+ 8100.00 123.457 0.87315640 0.91974827 1.00000000 0.29281928 0.30816524 0.19162486 0.30250119
+ 8200.00 121.951 0.86744421 0.91604254 1.00000000 0.29188041 0.30711774 0.19134517 0.30200123
+ 8300.00 120.482 0.86191983 0.91245088 1.00000000 0.29096927 0.30609613 0.19107470 0.30151239
+ 8400.00 119.048 0.85657444 0.90896831 1.00000000 0.29008472 0.30509957 0.19081303 0.30103433
+ 8500.00 117.647 0.85139976 0.90559011 1.00000000 0.28922569 0.30412727 0.19055976 0.30056676
+ 8600.00 116.279 0.84638799 0.90231183 1.00000000 0.28839116 0.30317845 0.19031452 0.30010938
+ 8700.00 114.943 0.84153180 0.89912926 1.00000000 0.28758016 0.30225239 0.19007694 0.29966190
+ 8800.00 113.636 0.83682430 0.89603843 1.00000000 0.28679177 0.30134837 0.18984670 0.29922403
+ 8900.00 112.360 0.83225897 0.89303558 1.00000000 0.28602511 0.30046569 0.18962347 0.29879552
+ 9000.00 111.111 0.82782969 0.89011714 1.00000000 0.28527935 0.29960369 0.18940696 0.29837609
+ 9100.00 109.890 0.82353066 0.88727974 1.00000000 0.28455370 0.29876173 0.18919689 0.29796550
+ 9200.00 108.696 0.81935641 0.88452017 1.00000000 0.28384740 0.29793919 0.18899298 0.29756349
+ 9300.00 107.527 0.81530175 0.88183541 1.00000000 0.28315974 0.29713548 0.18879499 0.29716984
+ 9400.00 106.383 0.81136180 0.87922257 1.00000000 0.28249004 0.29635003 0.18860267 0.29678431
+ 9500.00 105.263 0.80753191 0.87667891 1.00000000 0.28183762 0.29558228 0.18841579 0.29640668
+ 9600.00 104.167 0.80380769 0.87420182 1.00000000 0.28120189 0.29483169 0.18823415 0.29603673
+ 9700.00 103.093 0.80018497 0.87178882 1.00000000 0.28058223 0.29409775 0.18805752 0.29567426
+ 9800.00 102.041 0.79665980 0.86943756 1.00000000 0.27997808 0.29337997 0.18788573 0.29531906
+ 9900.00 101.010 0.79322843 0.86714579 1.00000000 0.27938891 0.29267787 0.18771858 0.29497094
+10000.00 100.000 0.78988728 0.86491137 1.00000000 0.27881418 0.29199098 0.18755589 0.29462971
+10100.00 99.010 0.78663296 0.86273225 1.00000000 0.27825341 0.29131886 0.18739750 0.29429519
+10200.00 98.039 0.78346225 0.86060650 1.00000000 0.27770613 0.29066108 0.18724326 0.29396720
+10300.00 97.087 0.78037207 0.85853224 1.00000000 0.27717187 0.29001723 0.18709300 0.29364556
+10400.00 96.154 0.77735950 0.85650771 1.00000000 0.27665020 0.28938690 0.18694658 0.29333012
+10500.00 95.238 0.77442176 0.85453121 1.00000000 0.27614071 0.28876971 0.18680386 0.29302070
+10600.00 94.340 0.77155617 0.85260112 1.00000000 0.27564300 0.28816528 0.18666472 0.29271716
+10700.00 93.458 0.76876022 0.85071588 1.00000000 0.27515669 0.28757326 0.18652902 0.29241934
+10800.00 92.593 0.76603147 0.84887402 1.00000000 0.27468141 0.28699330 0.18639665 0.29212710
+10900.00 91.743 0.76336762 0.84707411 1.00000000 0.27421680 0.28642506 0.18626749 0.29184030
+11000.00 90.909 0.76076645 0.84531479 1.00000000 0.27376254 0.28586822 0.18614142 0.29155879
+11100.00 90.090 0.75822586 0.84359476 1.00000000 0.27331830 0.28532246 0.18601836 0.29128244
+11200.00 89.286 0.75574383 0.84191277 1.00000000 0.27288377 0.28478748 0.18589819 0.29101113
+11300.00 88.496 0.75331843 0.84026762 1.00000000 0.27245865 0.28426300 0.18578081 0.29074473
+11400.00 87.719 0.75094780 0.83865816 1.00000000 0.27204265 0.28374872 0.18566615 0.29048312
+11500.00 86.957 0.74863017 0.83708329 1.00000000 0.27163550 0.28324437 0.18555410 0.29022618
+11600.00 86.207 0.74636386 0.83554194 1.00000000 0.27123693 0.28274970 0.18544459 0.28997379
+11700.00 85.470 0.74414722 0.83403311 1.00000000 0.27084669 0.28226443 0.18533753 0.28972585
+11800.00 84.746 0.74197871 0.83255582 1.00000000 0.27046454 0.28178833 0.18523284 0.28948224
+11900.00 84.034 0.73985682 0.83110912 1.00000000 0.27009023 0.28132116 0.18513046 0.28924287
+12000.00 83.333 0.73778012 0.82969211 1.00000000 0.26972354 0.28086268 0.18503030 0.28900764
+12100.00 82.645 0.73574723 0.82830393 1.00000000 0.26936425 0.28041268 0.18493231 0.28877643
+12200.00 81.967 0.73375683 0.82694373 1.00000000 0.26901215 0.27997093 0.18483641 0.28854917
+12300.00 81.301 0.73180765 0.82561071 1.00000000 0.26866703 0.27953722 0.18474254 0.28832575
+12400.00 80.645 0.72989845 0.82430410 1.00000000 0.26832871 0.27911135 0.18465064 0.28810608
+12500.00 80.000 0.72802807 0.82302316 1.00000000 0.26799699 0.27869313 0.18456065 0.28789009
+12600.00 79.365 0.72619537 0.82176715 1.00000000 0.26767169 0.27828236 0.18447252 0.28767768
+12700.00 78.740 0.72439927 0.82053539 1.00000000 0.26735264 0.27787886 0.18438618 0.28746877
+12800.00 78.125 0.72263872 0.81932722 1.00000000 0.26703966 0.27748244 0.18430160 0.28726328
+12900.00 77.519 0.72091270 0.81814197 1.00000000 0.26673259 0.27709295 0.18421871 0.28706114
+13000.00 76.923 0.71922025 0.81697905 1.00000000 0.26643127 0.27671020 0.18413748 0.28686226
+13100.00 76.336 0.71756043 0.81583783 1.00000000 0.26613555 0.27633403 0.18405784 0.28666658
+13200.00 75.758 0.71593234 0.81471775 1.00000000 0.26584529 0.27596430 0.18397977 0.28647403
+13300.00 75.188 0.71433510 0.81361825 1.00000000 0.26556034 0.27560083 0.18390321 0.28628453
+13400.00 74.627 0.71276788 0.81253878 1.00000000 0.26528056 0.27524349 0.18382812 0.28609801
+13500.00 74.074 0.71122987 0.81147883 1.00000000 0.26500582 0.27489213 0.18375447 0.28591442
+13600.00 73.529 0.70972029 0.81043789 1.00000000 0.26473599 0.27454660 0.18368221 0.28573368
+13700.00 72.993 0.70823838 0.80941546 1.00000000 0.26447094 0.27420679 0.18361130 0.28555574
+13800.00 72.464 0.70678342 0.80841109 1.00000000 0.26421057 0.27387254 0.18354172 0.28538054
+13900.00 71.942 0.70535469 0.80742432 1.00000000 0.26395474 0.27354374 0.18347342 0.28520801
+14000.00 71.429 0.70395153 0.80645469 1.00000000 0.26370334 0.27322025 0.18340637 0.28503811
+14100.00 70.922 0.70257327 0.80550180 1.00000000 0.26345628 0.27290197 0.18334054 0.28487076
+14200.00 70.423 0.70121928 0.80456522 1.00000000 0.26321343 0.27258876 0.18327590 0.28470593
+14300.00 69.930 0.69988894 0.80364455 1.00000000 0.26297471 0.27228052 0.18321241 0.28454355
+14400.00 69.444 0.69858167 0.80273941 1.00000000 0.26274000 0.27197714 0.18315005 0.28438358
+14500.00 68.966 0.69729688 0.80184943 1.00000000 0.26250922 0.27167851 0.18308879 0.28422596
+14600.00 68.493 0.69603402 0.80097423 1.00000000 0.26228226 0.27138452 0.18302860 0.28407066
+14700.00 68.027 0.69479255 0.80011347 1.00000000 0.26205905 0.27109507 0.18296946 0.28391761
+14800.00 67.568 0.69357196 0.79926681 1.00000000 0.26183948 0.27081007 0.18291133 0.28376677
+14900.00 67.114 0.69237173 0.79843391 1.00000000 0.26162348 0.27052941 0.18285419 0.28361811
+15000.00 66.667 0.69119138 0.79761446 1.00000000 0.26141097 0.27025301 0.18279803 0.28347157
+15100.00 66.225 0.69003044 0.79680814 1.00000000 0.26120186 0.26998077 0.18274281 0.28332711
+15200.00 65.789 0.68888844 0.79601466 1.00000000 0.26099608 0.26971261 0.18268851 0.28318469
+15300.00 65.359 0.68776494 0.79523371 1.00000000 0.26079354 0.26944843 0.18263512 0.28304427
+15400.00 64.935 0.68665951 0.79446502 1.00000000 0.26059419 0.26918816 0.18258260 0.28290581
+15500.00 64.516 0.68557173 0.79370830 1.00000000 0.26039794 0.26893170 0.18253094 0.28276927
+15600.00 64.103 0.68450119 0.79296330 1.00000000 0.26020473 0.26867900 0.18248012 0.28263462
+15700.00 63.694 0.68344751 0.79222975 1.00000000 0.26001448 0.26842995 0.18243012 0.28250182
+15800.00 63.291 0.68241029 0.79150740 1.00000000 0.25982715 0.26818450 0.18238092 0.28237083
+15900.00 62.893 0.68138918 0.79079600 1.00000000 0.25964265 0.26794257 0.18233250 0.28224161
+16000.00 62.500 0.68038380 0.79009531 1.00000000 0.25946093 0.26770408 0.18228485 0.28211414
+16100.00 62.112 0.67939381 0.78940511 1.00000000 0.25928194 0.26746897 0.18223794 0.28198837
+16200.00 61.728 0.67841888 0.78872517 1.00000000 0.25910561 0.26723717 0.18219177 0.28186429
+16300.00 61.350 0.67745866 0.78805526 1.00000000 0.25893188 0.26700861 0.18214630 0.28174185
+16400.00 60.976 0.67651284 0.78739518 1.00000000 0.25876070 0.26678322 0.18210154 0.28162102
+16500.00 60.606 0.67558112 0.78674472 1.00000000 0.25859202 0.26656096 0.18205746 0.28150178
+16600.00 60.241 0.67466317 0.78610368 1.00000000 0.25842578 0.26634174 0.18201404 0.28138410
+16700.00 59.880 0.67375872 0.78547186 1.00000000 0.25826194 0.26612553 0.18197128 0.28126794
+16800.00 59.524 0.67286748 0.78484907 1.00000000 0.25810044 0.26591224 0.18192916 0.28115328
+16900.00 59.172 0.67198916 0.78423512 1.00000000 0.25794124 0.26570184 0.18188766 0.28104009
+17000.00 58.824 0.67112350 0.78362984 1.00000000 0.25778429 0.26549426 0.18184677 0.28092835
+17100.00 58.480 0.67027024 0.78303305 1.00000000 0.25762954 0.26528946 0.18180649 0.28081802
+17200.00 58.140 0.66942911 0.78244457 1.00000000 0.25747695 0.26508737 0.18176679 0.28070909
+17300.00 57.803 0.66859988 0.78186425 1.00000000 0.25732648 0.26488795 0.18172766 0.28060152
+17400.00 57.471 0.66778228 0.78129191 1.00000000 0.25717808 0.26469114 0.18168910 0.28049530
+17500.00 57.143 0.66697610 0.78072740 1.00000000 0.25703172 0.26449690 0.18165109 0.28039039
+17600.00 56.818 0.66618110 0.78017057 1.00000000 0.25688735 0.26430518 0.18161362 0.28028679
+17700.00 56.497 0.66539706 0.77962127 1.00000000 0.25674494 0.26411594 0.18157667 0.28018445
+17800.00 56.180 0.66462376 0.77907934 1.00000000 0.25660444 0.26392912 0.18154025 0.28008337
+17900.00 55.866 0.66386098 0.77854465 1.00000000 0.25646582 0.26374469 0.18150433 0.27998352
+18000.00 55.556 0.66310852 0.77801705 1.00000000 0.25632905 0.26356259 0.18146890 0.27988487
+18100.00 55.249 0.66236618 0.77749642 1.00000000 0.25619408 0.26338280 0.18143397 0.27978741
+18200.00 54.945 0.66163375 0.77698261 1.00000000 0.25606089 0.26320525 0.18139951 0.27969112
+18300.00 54.645 0.66091106 0.77647551 1.00000000 0.25592944 0.26302993 0.18136552 0.27959598
+18400.00 54.348 0.66019791 0.77597498 1.00000000 0.25579969 0.26285678 0.18133199 0.27950196
+18500.00 54.054 0.65949412 0.77548090 1.00000000 0.25567162 0.26268577 0.18129891 0.27940905
+18600.00 53.763 0.65879952 0.77499315 1.00000000 0.25554520 0.26251686 0.18126627 0.27931724
+18700.00 53.476 0.65811392 0.77451161 1.00000000 0.25542039 0.26235001 0.18123407 0.27922649
+18800.00 53.191 0.65743716 0.77403618 1.00000000 0.25529717 0.26218519 0.18120229 0.27913680
+18900.00 52.910 0.65676908 0.77356673 1.00000000 0.25517550 0.26202236 0.18117092 0.27904814
+19000.00 52.632 0.65610952 0.77310316 1.00000000 0.25505536 0.26186149 0.18113997 0.27896051
+19100.00 52.356 0.65545831 0.77264537 1.00000000 0.25493672 0.26170254 0.18110941 0.27887387
+19200.00 52.083 0.65481530 0.77219324 1.00000000 0.25481955 0.26154548 0.18107925 0.27878822
+19300.00 51.813 0.65418036 0.77174669 1.00000000 0.25470383 0.26139028 0.18104948 0.27870355
+19400.00 51.546 0.65355332 0.77130560 1.00000000 0.25458953 0.26123691 0.18102008 0.27861982
+19500.00 51.282 0.65293404 0.77086988 1.00000000 0.25447663 0.26108533 0.18099106 0.27853704
+19600.00 51.020 0.65232240 0.77043944 1.00000000 0.25436510 0.26093552 0.18096240 0.27845518
+19700.00 50.761 0.65171824 0.77001419 1.00000000 0.25425491 0.26078745 0.18093410 0.27837423
+19800.00 50.505 0.65112144 0.76959404 1.00000000 0.25414605 0.26064108 0.18090615 0.27829417
+19900.00 50.251 0.65053187 0.76917889 1.00000000 0.25403849 0.26049640 0.18087855 0.27821499
+20000.00 50.000 0.64994941 0.76876866 1.00000000 0.25393221 0.26035336 0.18085129 0.27813668
+20100.00 49.751 0.64937392 0.76836326 1.00000000 0.25382719 0.26021195 0.18082436 0.27805923
+20200.00 49.505 0.64880528 0.76796263 1.00000000 0.25372340 0.26007214 0.18079776 0.27798261
+20300.00 49.261 0.64824339 0.76756666 1.00000000 0.25362082 0.25993390 0.18077149 0.27790682
+20400.00 49.020 0.64768812 0.76717529 1.00000000 0.25351944 0.25979721 0.18074552 0.27783185
+20500.00 48.780 0.64713935 0.76678844 1.00000000 0.25341923 0.25966204 0.18071987 0.27775767
+20600.00 48.544 0.64659699 0.76640603 1.00000000 0.25332018 0.25952837 0.18069453 0.27768429
+20700.00 48.309 0.64606092 0.76602798 1.00000000 0.25322226 0.25939617 0.18066949 0.27761168
+20800.00 48.077 0.64553103 0.76565424 1.00000000 0.25312546 0.25926542 0.18064474 0.27753984
+20900.00 47.847 0.64500722 0.76528472 1.00000000 0.25302975 0.25913610 0.18062028 0.27746875
+21000.00 47.619 0.64448939 0.76491935 1.00000000 0.25293513 0.25900818 0.18059610 0.27739840
+21100.00 47.393 0.64397745 0.76455808 1.00000000 0.25284157 0.25888165 0.18057221 0.27732879
+21200.00 47.170 0.64347129 0.76420082 1.00000000 0.25274905 0.25875648 0.18054859 0.27725989
+21300.00 46.948 0.64297081 0.76384753 1.00000000 0.25265756 0.25863264 0.18052524 0.27719171
+21400.00 46.729 0.64247594 0.76349813 1.00000000 0.25256708 0.25851013 0.18050216 0.27712422
+21500.00 46.512 0.64198657 0.76315256 1.00000000 0.25247760 0.25838892 0.18047934 0.27705743
+21600.00 46.296 0.64150261 0.76281076 1.00000000 0.25238910 0.25826899 0.18045678 0.27699131
+21700.00 46.083 0.64102399 0.76247267 1.00000000 0.25230156 0.25815032 0.18043448 0.27692586
+21800.00 45.872 0.64055061 0.76213824 1.00000000 0.25221497 0.25803289 0.18041242 0.27686107
+21900.00 45.662 0.64008239 0.76180740 1.00000000 0.25212932 0.25791668 0.18039061 0.27679693
+22000.00 45.455 0.63961926 0.76148010 1.00000000 0.25204458 0.25780168 0.18036904 0.27673343
+22100.00 45.249 0.63916112 0.76115628 1.00000000 0.25196075 0.25768786 0.18034771 0.27667056
+22200.00 45.045 0.63870790 0.76083590 1.00000000 0.25187781 0.25757522 0.18032661 0.27660831
+22300.00 44.843 0.63825953 0.76051890 1.00000000 0.25179575 0.25746372 0.18030574 0.27654668
+22400.00 44.643 0.63781592 0.76020522 1.00000000 0.25171456 0.25735336 0.18028510 0.27648565
+22500.00 44.444 0.63737701 0.75989482 1.00000000 0.25163421 0.25724411 0.18026468 0.27642521
+22600.00 44.248 0.63694273 0.75958764 1.00000000 0.25155470 0.25713597 0.18024448 0.27636537
+22700.00 44.053 0.63651299 0.75928365 1.00000000 0.25147602 0.25702891 0.18022450 0.27630610
+22800.00 43.860 0.63608774 0.75898278 1.00000000 0.25139815 0.25692292 0.18020472 0.27624740
+22900.00 43.668 0.63566691 0.75868499 1.00000000 0.25132108 0.25681798 0.18018516 0.27618927
+23000.00 43.478 0.63525042 0.75839025 1.00000000 0.25124480 0.25671409 0.18016581 0.27613169
+23100.00 43.290 0.63483822 0.75809849 1.00000000 0.25116929 0.25661122 0.18014666 0.27607466
+23200.00 43.103 0.63443023 0.75780969 1.00000000 0.25109456 0.25650936 0.18012770 0.27601818
+23300.00 42.918 0.63402641 0.75752379 1.00000000 0.25102057 0.25640849 0.18010895 0.27596222
+23400.00 42.735 0.63362667 0.75724075 1.00000000 0.25094733 0.25630860 0.18009039 0.27590679
+23500.00 42.553 0.63323097 0.75696053 1.00000000 0.25087483 0.25620968 0.18007202 0.27585188
+23600.00 42.373 0.63283925 0.75668310 1.00000000 0.25080304 0.25611172 0.18005383 0.27579747
+23700.00 42.194 0.63245144 0.75640840 1.00000000 0.25073197 0.25601470 0.18003584 0.27574358
+23800.00 42.017 0.63206749 0.75613641 1.00000000 0.25066160 0.25591860 0.18001802 0.27569018
+23900.00 41.841 0.63168735 0.75586707 1.00000000 0.25059192 0.25582342 0.18000039 0.27563727
+24000.00 41.667 0.63131096 0.75560036 1.00000000 0.25052292 0.25572914 0.17998293 0.27558485
+24100.00 41.494 0.63093826 0.75533624 1.00000000 0.25045459 0.25563575 0.17996565 0.27553291
+24200.00 41.322 0.63056920 0.75507467 1.00000000 0.25038692 0.25554324 0.17994854 0.27548144
+24300.00 41.152 0.63020374 0.75481562 1.00000000 0.25031991 0.25545159 0.17993160 0.27543043
+24400.00 40.984 0.62984181 0.75455904 1.00000000 0.25025354 0.25536080 0.17991483 0.27537988
+24500.00 40.816 0.62948337 0.75430491 1.00000000 0.25018781 0.25527085 0.17989822 0.27532979
+24600.00 40.650 0.62912838 0.75405319 1.00000000 0.25012270 0.25518173 0.17988177 0.27528015
+24700.00 40.486 0.62877678 0.75380385 1.00000000 0.25005821 0.25509343 0.17986549 0.27523094
+24800.00 40.323 0.62842852 0.75355685 1.00000000 0.24999433 0.25500594 0.17984936 0.27518218
+24900.00 40.161 0.62808356 0.75331217 1.00000000 0.24993104 0.25491925 0.17983339 0.27513384
+25000.00 40.000 0.62774186 0.75306977 1.00000000 0.24986835 0.25483334 0.17981757 0.27508593
+25100.00 39.841 0.62740336 0.75282962 1.00000000 0.24980625 0.25474821 0.17980190 0.27503844
diff --git a/src/colorramp.c b/src/colorramp.c
index 4d32d7e..158f7cd 100644
--- a/src/colorramp.c
+++ b/src/colorramp.c
@@ -14,107 +14,261 @@
You should have received a copy of the GNU General Public License
along with Redshift. If not, see <http://www.gnu.org/licenses/>.
- Copyright (c) 2010 Jon Lund Steffensen <jonlst@gmail.com>
+ Copyright (c) 2013 Jon Lund Steffensen <jonlst@gmail.com>
+ Copyright (c) 2013 Ingo Thies <ithies@astro.uni-bonn.de>
*/
#include <stdint.h>
#include <math.h>
-/* Source: http://www.vendian.org/mncharity/dir3/blackbody/
- Rescaled to make exactly 6500K equal to full intensity in all channels. */
+/* Whitepoint values for temperatures at 100K intervals.
+ These will be interpolated for the actual temperature.
+ This table was provided by Ingo Thies, 2013. See
+ the file README-colorramp for more information. */
static const float blackbody_color[] = {
- 1.0000, 0.0425, 0.0000, /* 1000K */
- 1.0000, 0.0668, 0.0000, /* 1100K */
- 1.0000, 0.0911, 0.0000, /* 1200K */
- 1.0000, 0.1149, 0.0000, /* ... */
- 1.0000, 0.1380, 0.0000,
- 1.0000, 0.1604, 0.0000,
- 1.0000, 0.1819, 0.0000,
- 1.0000, 0.2024, 0.0000,
- 1.0000, 0.2220, 0.0000,
- 1.0000, 0.2406, 0.0000,
- 1.0000, 0.2630, 0.0062,
- 1.0000, 0.2868, 0.0155,
- 1.0000, 0.3102, 0.0261,
- 1.0000, 0.3334, 0.0379,
- 1.0000, 0.3562, 0.0508,
- 1.0000, 0.3787, 0.0650,
- 1.0000, 0.4008, 0.0802,
- 1.0000, 0.4227, 0.0964,
- 1.0000, 0.4442, 0.1136,
- 1.0000, 0.4652, 0.1316,
- 1.0000, 0.4859, 0.1505,
- 1.0000, 0.5062, 0.1702,
- 1.0000, 0.5262, 0.1907,
- 1.0000, 0.5458, 0.2118,
- 1.0000, 0.5650, 0.2335,
- 1.0000, 0.5839, 0.2558,
- 1.0000, 0.6023, 0.2786,
- 1.0000, 0.6204, 0.3018,
- 1.0000, 0.6382, 0.3255,
- 1.0000, 0.6557, 0.3495,
- 1.0000, 0.6727, 0.3739,
- 1.0000, 0.6894, 0.3986,
- 1.0000, 0.7058, 0.4234,
- 1.0000, 0.7218, 0.4485,
- 1.0000, 0.7375, 0.4738,
- 1.0000, 0.7529, 0.4992,
- 1.0000, 0.7679, 0.5247,
- 1.0000, 0.7826, 0.5503,
- 1.0000, 0.7970, 0.5760,
- 1.0000, 0.8111, 0.6016,
- 1.0000, 0.8250, 0.6272,
- 1.0000, 0.8384, 0.6529,
- 1.0000, 0.8517, 0.6785,
- 1.0000, 0.8647, 0.7040,
- 1.0000, 0.8773, 0.7294,
- 1.0000, 0.8897, 0.7548,
- 1.0000, 0.9019, 0.7801,
- 1.0000, 0.9137, 0.8051,
- 1.0000, 0.9254, 0.8301,
- 1.0000, 0.9367, 0.8550,
- 1.0000, 0.9478, 0.8795,
- 1.0000, 0.9587, 0.9040,
- 1.0000, 0.9694, 0.9283,
- 1.0000, 0.9798, 0.9524,
- 1.0000, 0.9900, 0.9763,
- 1.0000, 1.0000, 1.0000, /* 6500K */
- 0.9771, 0.9867, 1.0000,
- 0.9554, 0.9740, 1.0000,
- 0.9349, 0.9618, 1.0000,
- 0.9154, 0.9500, 1.0000,
- 0.8968, 0.9389, 1.0000,
- 0.8792, 0.9282, 1.0000,
- 0.8624, 0.9179, 1.0000,
- 0.8465, 0.9080, 1.0000,
- 0.8313, 0.8986, 1.0000,
- 0.8167, 0.8895, 1.0000,
- 0.8029, 0.8808, 1.0000,
- 0.7896, 0.8724, 1.0000,
- 0.7769, 0.8643, 1.0000,
- 0.7648, 0.8565, 1.0000,
- 0.7532, 0.8490, 1.0000,
- 0.7420, 0.8418, 1.0000,
- 0.7314, 0.8348, 1.0000,
- 0.7212, 0.8281, 1.0000,
- 0.7113, 0.8216, 1.0000,
- 0.7018, 0.8153, 1.0000,
- 0.6927, 0.8092, 1.0000,
- 0.6839, 0.8032, 1.0000,
- 0.6755, 0.7975, 1.0000,
- 0.6674, 0.7921, 1.0000,
- 0.6595, 0.7867, 1.0000,
- 0.6520, 0.7816, 1.0000,
- 0.6447, 0.7765, 1.0000,
- 0.6376, 0.7717, 1.0000,
- 0.6308, 0.7670, 1.0000,
- 0.6242, 0.7623, 1.0000,
- 0.6179, 0.7579, 1.0000,
- 0.6117, 0.7536, 1.0000,
- 0.6058, 0.7493, 1.0000,
- 0.6000, 0.7453, 1.0000,
- 0.5944, 0.7414, 1.0000 /* 10000K */
+ 1.00000000, 0.18172716, 0.00000000, /* 1000K */
+ 1.00000000, 0.25503671, 0.00000000, /* 1100K */
+ 1.00000000, 0.30942099, 0.00000000, /* 1200K */
+ 1.00000000, 0.35357379, 0.00000000, /* ... */
+ 1.00000000, 0.39091524, 0.00000000,
+ 1.00000000, 0.42322816, 0.00000000,
+ 1.00000000, 0.45159884, 0.00000000,
+ 1.00000000, 0.47675916, 0.00000000,
+ 1.00000000, 0.49923747, 0.00000000,
+ 1.00000000, 0.51943421, 0.00000000,
+ 1.00000000, 0.54360078, 0.08679949,
+ 1.00000000, 0.56618736, 0.14065513,
+ 1.00000000, 0.58734976, 0.18362641,
+ 1.00000000, 0.60724493, 0.22137978,
+ 1.00000000, 0.62600248, 0.25591950,
+ 1.00000000, 0.64373109, 0.28819679,
+ 1.00000000, 0.66052319, 0.31873863,
+ 1.00000000, 0.67645822, 0.34786758,
+ 1.00000000, 0.69160518, 0.37579588,
+ 1.00000000, 0.70602449, 0.40267128,
+ 1.00000000, 0.71976951, 0.42860152,
+ 1.00000000, 0.73288760, 0.45366838,
+ 1.00000000, 0.74542112, 0.47793608,
+ 1.00000000, 0.75740814, 0.50145662,
+ 1.00000000, 0.76888303, 0.52427322,
+ 1.00000000, 0.77987699, 0.54642268,
+ 1.00000000, 0.79041843, 0.56793692,
+ 1.00000000, 0.80053332, 0.58884417,
+ 1.00000000, 0.81024551, 0.60916971,
+ 1.00000000, 0.81957693, 0.62893653,
+ 1.00000000, 0.82854786, 0.64816570,
+ 1.00000000, 0.83717703, 0.66687674,
+ 1.00000000, 0.84548188, 0.68508786,
+ 1.00000000, 0.85347859, 0.70281616,
+ 1.00000000, 0.86118227, 0.72007777,
+ 1.00000000, 0.86860704, 0.73688797,
+ 1.00000000, 0.87576611, 0.75326132,
+ 1.00000000, 0.88267187, 0.76921169,
+ 1.00000000, 0.88933596, 0.78475236,
+ 1.00000000, 0.89576933, 0.79989606,
+ 1.00000000, 0.90198230, 0.81465502,
+ 1.00000000, 0.90963069, 0.82838210,
+ 1.00000000, 0.91710889, 0.84190889,
+ 1.00000000, 0.92441842, 0.85523742,
+ 1.00000000, 0.93156127, 0.86836903,
+ 1.00000000, 0.93853986, 0.88130458,
+ 1.00000000, 0.94535695, 0.89404470,
+ 1.00000000, 0.95201559, 0.90658983,
+ 1.00000000, 0.95851906, 0.91894041,
+ 1.00000000, 0.96487079, 0.93109690,
+ 1.00000000, 0.97107439, 0.94305985,
+ 1.00000000, 0.97713351, 0.95482993,
+ 1.00000000, 0.98305189, 0.96640795,
+ 1.00000000, 0.98883326, 0.97779486,
+ 1.00000000, 0.99448139, 0.98899179,
+ 1.00000000, 1.00000000, 1.00000000, /* 6500K */
+ 0.98947904, 0.99348723, 1.00000000,
+ 0.97940448, 0.98722715, 1.00000000,
+ 0.96975025, 0.98120637, 1.00000000,
+ 0.96049223, 0.97541240, 1.00000000,
+ 0.95160805, 0.96983355, 1.00000000,
+ 0.94303638, 0.96443333, 1.00000000,
+ 0.93480451, 0.95923080, 1.00000000,
+ 0.92689056, 0.95421394, 1.00000000,
+ 0.91927697, 0.94937330, 1.00000000,
+ 0.91194747, 0.94470005, 1.00000000,
+ 0.90488690, 0.94018594, 1.00000000,
+ 0.89808115, 0.93582323, 1.00000000,
+ 0.89151710, 0.93160469, 1.00000000,
+ 0.88518247, 0.92752354, 1.00000000,
+ 0.87906581, 0.92357340, 1.00000000,
+ 0.87315640, 0.91974827, 1.00000000,
+ 0.86744421, 0.91604254, 1.00000000,
+ 0.86191983, 0.91245088, 1.00000000,
+ 0.85657444, 0.90896831, 1.00000000,
+ 0.85139976, 0.90559011, 1.00000000,
+ 0.84638799, 0.90231183, 1.00000000,
+ 0.84153180, 0.89912926, 1.00000000,
+ 0.83682430, 0.89603843, 1.00000000,
+ 0.83225897, 0.89303558, 1.00000000,
+ 0.82782969, 0.89011714, 1.00000000,
+ 0.82353066, 0.88727974, 1.00000000,
+ 0.81935641, 0.88452017, 1.00000000,
+ 0.81530175, 0.88183541, 1.00000000,
+ 0.81136180, 0.87922257, 1.00000000,
+ 0.80753191, 0.87667891, 1.00000000,
+ 0.80380769, 0.87420182, 1.00000000,
+ 0.80018497, 0.87178882, 1.00000000,
+ 0.79665980, 0.86943756, 1.00000000,
+ 0.79322843, 0.86714579, 1.00000000,
+ 0.78988728, 0.86491137, 1.00000000, /* 10000K */
+ 0.78663296, 0.86273225, 1.00000000,
+ 0.78346225, 0.86060650, 1.00000000,
+ 0.78037207, 0.85853224, 1.00000000,
+ 0.77735950, 0.85650771, 1.00000000,
+ 0.77442176, 0.85453121, 1.00000000,
+ 0.77155617, 0.85260112, 1.00000000,
+ 0.76876022, 0.85071588, 1.00000000,
+ 0.76603147, 0.84887402, 1.00000000,
+ 0.76336762, 0.84707411, 1.00000000,
+ 0.76076645, 0.84531479, 1.00000000,
+ 0.75822586, 0.84359476, 1.00000000,
+ 0.75574383, 0.84191277, 1.00000000,
+ 0.75331843, 0.84026762, 1.00000000,
+ 0.75094780, 0.83865816, 1.00000000,
+ 0.74863017, 0.83708329, 1.00000000,
+ 0.74636386, 0.83554194, 1.00000000,
+ 0.74414722, 0.83403311, 1.00000000,
+ 0.74197871, 0.83255582, 1.00000000,
+ 0.73985682, 0.83110912, 1.00000000,
+ 0.73778012, 0.82969211, 1.00000000,
+ 0.73574723, 0.82830393, 1.00000000,
+ 0.73375683, 0.82694373, 1.00000000,
+ 0.73180765, 0.82561071, 1.00000000,
+ 0.72989845, 0.82430410, 1.00000000,
+ 0.72802807, 0.82302316, 1.00000000,
+ 0.72619537, 0.82176715, 1.00000000,
+ 0.72439927, 0.82053539, 1.00000000,
+ 0.72263872, 0.81932722, 1.00000000,
+ 0.72091270, 0.81814197, 1.00000000,
+ 0.71922025, 0.81697905, 1.00000000,
+ 0.71756043, 0.81583783, 1.00000000,
+ 0.71593234, 0.81471775, 1.00000000,
+ 0.71433510, 0.81361825, 1.00000000,
+ 0.71276788, 0.81253878, 1.00000000,
+ 0.71122987, 0.81147883, 1.00000000,
+ 0.70972029, 0.81043789, 1.00000000,
+ 0.70823838, 0.80941546, 1.00000000,
+ 0.70678342, 0.80841109, 1.00000000,
+ 0.70535469, 0.80742432, 1.00000000,
+ 0.70395153, 0.80645469, 1.00000000,
+ 0.70257327, 0.80550180, 1.00000000,
+ 0.70121928, 0.80456522, 1.00000000,
+ 0.69988894, 0.80364455, 1.00000000,
+ 0.69858167, 0.80273941, 1.00000000,
+ 0.69729688, 0.80184943, 1.00000000,
+ 0.69603402, 0.80097423, 1.00000000,
+ 0.69479255, 0.80011347, 1.00000000,
+ 0.69357196, 0.79926681, 1.00000000,
+ 0.69237173, 0.79843391, 1.00000000,
+ 0.69119138, 0.79761446, 1.00000000, /* 15000K */
+ 0.69003044, 0.79680814, 1.00000000,
+ 0.68888844, 0.79601466, 1.00000000,
+ 0.68776494, 0.79523371, 1.00000000,
+ 0.68665951, 0.79446502, 1.00000000,
+ 0.68557173, 0.79370830, 1.00000000,
+ 0.68450119, 0.79296330, 1.00000000,
+ 0.68344751, 0.79222975, 1.00000000,
+ 0.68241029, 0.79150740, 1.00000000,
+ 0.68138918, 0.79079600, 1.00000000,
+ 0.68038380, 0.79009531, 1.00000000,
+ 0.67939381, 0.78940511, 1.00000000,
+ 0.67841888, 0.78872517, 1.00000000,
+ 0.67745866, 0.78805526, 1.00000000,
+ 0.67651284, 0.78739518, 1.00000000,
+ 0.67558112, 0.78674472, 1.00000000,
+ 0.67466317, 0.78610368, 1.00000000,
+ 0.67375872, 0.78547186, 1.00000000,
+ 0.67286748, 0.78484907, 1.00000000,
+ 0.67198916, 0.78423512, 1.00000000,
+ 0.67112350, 0.78362984, 1.00000000,
+ 0.67027024, 0.78303305, 1.00000000,
+ 0.66942911, 0.78244457, 1.00000000,
+ 0.66859988, 0.78186425, 1.00000000,
+ 0.66778228, 0.78129191, 1.00000000,
+ 0.66697610, 0.78072740, 1.00000000,
+ 0.66618110, 0.78017057, 1.00000000,
+ 0.66539706, 0.77962127, 1.00000000,
+ 0.66462376, 0.77907934, 1.00000000,
+ 0.66386098, 0.77854465, 1.00000000,
+ 0.66310852, 0.77801705, 1.00000000,
+ 0.66236618, 0.77749642, 1.00000000,
+ 0.66163375, 0.77698261, 1.00000000,
+ 0.66091106, 0.77647551, 1.00000000,
+ 0.66019791, 0.77597498, 1.00000000,
+ 0.65949412, 0.77548090, 1.00000000,
+ 0.65879952, 0.77499315, 1.00000000,
+ 0.65811392, 0.77451161, 1.00000000,
+ 0.65743716, 0.77403618, 1.00000000,
+ 0.65676908, 0.77356673, 1.00000000,
+ 0.65610952, 0.77310316, 1.00000000,
+ 0.65545831, 0.77264537, 1.00000000,
+ 0.65481530, 0.77219324, 1.00000000,
+ 0.65418036, 0.77174669, 1.00000000,
+ 0.65355332, 0.77130560, 1.00000000,
+ 0.65293404, 0.77086988, 1.00000000,
+ 0.65232240, 0.77043944, 1.00000000,
+ 0.65171824, 0.77001419, 1.00000000,
+ 0.65112144, 0.76959404, 1.00000000,
+ 0.65053187, 0.76917889, 1.00000000,
+ 0.64994941, 0.76876866, 1.00000000, /* 20000K */
+ 0.64937392, 0.76836326, 1.00000000,
+ 0.64880528, 0.76796263, 1.00000000,
+ 0.64824339, 0.76756666, 1.00000000,
+ 0.64768812, 0.76717529, 1.00000000,
+ 0.64713935, 0.76678844, 1.00000000,
+ 0.64659699, 0.76640603, 1.00000000,
+ 0.64606092, 0.76602798, 1.00000000,
+ 0.64553103, 0.76565424, 1.00000000,
+ 0.64500722, 0.76528472, 1.00000000,
+ 0.64448939, 0.76491935, 1.00000000,
+ 0.64397745, 0.76455808, 1.00000000,
+ 0.64347129, 0.76420082, 1.00000000,
+ 0.64297081, 0.76384753, 1.00000000,
+ 0.64247594, 0.76349813, 1.00000000,
+ 0.64198657, 0.76315256, 1.00000000,
+ 0.64150261, 0.76281076, 1.00000000,
+ 0.64102399, 0.76247267, 1.00000000,
+ 0.64055061, 0.76213824, 1.00000000,
+ 0.64008239, 0.76180740, 1.00000000,
+ 0.63961926, 0.76148010, 1.00000000,
+ 0.63916112, 0.76115628, 1.00000000,
+ 0.63870790, 0.76083590, 1.00000000,
+ 0.63825953, 0.76051890, 1.00000000,
+ 0.63781592, 0.76020522, 1.00000000,
+ 0.63737701, 0.75989482, 1.00000000,
+ 0.63694273, 0.75958764, 1.00000000,
+ 0.63651299, 0.75928365, 1.00000000,
+ 0.63608774, 0.75898278, 1.00000000,
+ 0.63566691, 0.75868499, 1.00000000,
+ 0.63525042, 0.75839025, 1.00000000,
+ 0.63483822, 0.75809849, 1.00000000,
+ 0.63443023, 0.75780969, 1.00000000,
+ 0.63402641, 0.75752379, 1.00000000,
+ 0.63362667, 0.75724075, 1.00000000,
+ 0.63323097, 0.75696053, 1.00000000,
+ 0.63283925, 0.75668310, 1.00000000,
+ 0.63245144, 0.75640840, 1.00000000,
+ 0.63206749, 0.75613641, 1.00000000,
+ 0.63168735, 0.75586707, 1.00000000,
+ 0.63131096, 0.75560036, 1.00000000,
+ 0.63093826, 0.75533624, 1.00000000,
+ 0.63056920, 0.75507467, 1.00000000,
+ 0.63020374, 0.75481562, 1.00000000,
+ 0.62984181, 0.75455904, 1.00000000,
+ 0.62948337, 0.75430491, 1.00000000,
+ 0.62912838, 0.75405319, 1.00000000,
+ 0.62877678, 0.75380385, 1.00000000,
+ 0.62842852, 0.75355685, 1.00000000,
+ 0.62808356, 0.75331217, 1.00000000,
+ 0.62774186, 0.75306977, 1.00000000, /* 25000K */
+ 0.62740336, 0.75282962, 1.00000000 /* 25100K */
};
diff --git a/src/redshift.c b/src/redshift.c
index 1edfd86..d7e9b37 100644
--- a/src/redshift.c
+++ b/src/redshift.c
@@ -14,7 +14,7 @@
You should have received a copy of the GNU General Public License
along with Redshift. If not, see <http://www.gnu.org/licenses/>.
- Copyright (c) 2011 Jon Lund Steffensen <jonlst@gmail.com>
+ Copyright (c) 2013 Jon Lund Steffensen <jonlst@gmail.com>
*/
#ifdef HAVE_CONFIG_H
@@ -200,7 +200,7 @@ static const location_provider_t location_providers[] = {
#define MIN_LON -180.0
#define MAX_LON 180.0
#define MIN_TEMP 1000
-#define MAX_TEMP 10000
+#define MAX_TEMP 25000
#define MIN_BRIGHTNESS 0.1
#define MAX_BRIGHTNESS 1.0
#define MIN_GAMMA 0.1
@@ -208,7 +208,7 @@ static const location_provider_t location_providers[] = {
/* Default values for parameters. */
#define DEFAULT_DAY_TEMP 5500
-#define DEFAULT_NIGHT_TEMP 3700
+#define DEFAULT_NIGHT_TEMP 3500
#define DEFAULT_BRIGHTNESS 1.0
#define DEFAULT_GAMMA 1.0
@@ -996,7 +996,7 @@ main(int argc, char *argv[])
}
/* Color temperature at daytime */
- if (temp_day < MIN_TEMP || temp_day >= MAX_TEMP) {
+ if (temp_day < MIN_TEMP || temp_day > MAX_TEMP) {
fprintf(stderr,
_("Temperature must be between %uK and %uK.\n"),
MIN_TEMP, MAX_TEMP);
@@ -1004,7 +1004,7 @@ main(int argc, char *argv[])
}
/* Color temperature at night */
- if (temp_night < MIN_TEMP || temp_night >= MAX_TEMP) {
+ if (temp_night < MIN_TEMP || temp_night > MAX_TEMP) {
fprintf(stderr,
_("Temperature must be between %uK and %uK.\n"),
MIN_TEMP, MAX_TEMP);
@@ -1014,7 +1014,7 @@ main(int argc, char *argv[])
if (mode == PROGRAM_MODE_MANUAL) {
/* Check color temperature to be set */
- if (temp_set < MIN_TEMP || temp_set >= MAX_TEMP) {
+ if (temp_set < MIN_TEMP || temp_set > MAX_TEMP) {
fprintf(stderr,
_("Temperature must be between %uK and %uK.\n"),
MIN_TEMP, MAX_TEMP);