title: Linear to sRGB conversion
body: <p>I'm trying to convert values from to srgb/linear.
  I have this equation which works great, but I can't get it back after wards:</p>
  
  <pre><code>if(C &lt;= 0.0404482362771082):
      lin = C/12.92
  else:
      lin = pow(((C+0.055)/1.055), 2.4)
  </code></pre>
  
  <p>But getting it back using this does not work:</p>
  
  <pre><code>if(C &lt;= 0.00313066844250063):
      lin = C*12.92
  else:
      lin = pow((1.055*C),(1/2.4))-0.055
  </code></pre>
  
  <p>So I figured I could create some kind of table and get Python to calculate the equation but I'm not sure... How can I do it? I have these values with sRGB > Linear conversion I'd like to somehow use that as guide to get my liner > sRGB conversion... Or other way around I keep getting lost here...</p>
  
  <pre><code>0.05 ---- 0.00393593950409
  0.06 ---- 0.00489631008162
  0.07 ---- 0.00598105957262
  0.08 ---- 0.00719440929108
  0.09 ---- 0.00854038211212
  0.1 ---- 0.0100228255749
  0.11 ---- 0.0116454309058
  0.12 ---- 0.0134117488977
  0.13 ---- 0.0153252033206
  0.14 ---- 0.0173891023685
  0.15 ---- 0.0196066485162
  0.16 ---- 0.0219809470799
  0.17 ---- 0.0245150137035
  0.18 ---- 0.0272117809514
  0.19 ---- 0.0300741041466
  0.2 ---- 0.0331047665709
  0.21 ---- 0.0363064841182
  0.22 ---- 0.0396819094785
  0.23 ---- 0.0432336359153
  0.24 ---- 0.0469642006891
  0.25 ---- 0.0508760881716
  0.26 ---- 0.0549717326876
  0.27 ---- 0.0592535211173
  0.28 ---- 0.0637237952849
  0.29 ---- 0.0683848541582
  0.3 ---- 0.0732389558784
  0.31 ---- 0.0782883196387
  0.32 ---- 0.0835351274258
  0.33 ---- 0.0889815256384
  0.34 ---- 0.0946296265946
  0.35 ---- 0.100481509938
  0.36 ---- 0.106539223951
  0.37 ---- 0.112804786787
  0.38 ---- 0.119280187622
  0.39 ---- 0.125967387741
  0.4 ---- 0.132868321554
  0.41 ---- 0.139984897558
  0.42 ---- 0.147318999244
  0.43 ---- 0.15487248595
  0.44 ---- 0.162647193668
  0.45 ---- 0.170644935816
  0.46 ---- 0.178867503956
  0.47 ---- 0.187316668488
  0.48 ---- 0.195994179301
  0.49 ---- 0.204901766398
  0.5 ---- 0.214041140482
  0.51 ---- 0.223413993525
  0.52 ---- 0.233021999301
  0.53 ---- 0.242866813904
  0.54 ---- 0.252950076231
  0.55 ---- 0.263273408456
  0.56 ---- 0.273838416473
  0.57 ---- 0.284646690328
  0.58 ---- 0.295699804626
  0.59 ---- 0.306999318928
  0.6 ---- 0.318546778125
  0.61 ---- 0.330343712804
  0.62 ---- 0.342391639593
  0.63 ---- 0.354692061494
  0.64 ---- 0.36724646821
  0.65 ---- 0.38005633645
  0.66 ---- 0.393123130227
  0.67 ---- 0.406448301147
  0.68 ---- 0.420033288684
  0.69 ---- 0.433879520449
  0.7 ---- 0.447988412442
  0.71 ---- 0.462361369307
  0.72 ---- 0.476999784567
  0.73 ---- 0.491905040857
  0.74 ---- 0.507078510149
  0.75 ---- 0.522521553968
  0.76 ---- 0.538235523601
  0.77 ---- 0.554221760299
  0.78 ---- 0.570481595475
  0.79 ---- 0.587016350894
  0.8 ---- 0.603827338855
  0.81 ---- 0.620915862374
  0.82 ---- 0.638283215352
  0.83 ---- 0.655930682747
  0.84 ---- 0.673859540734
  0.85 ---- 0.692071056865
  0.86 ---- 0.710566490224
  0.87 ---- 0.729347091573
  0.88 ---- 0.748414103499
  0.89 ---- 0.767768760555
  0.9 ---- 0.787412289396
  0.91 ---- 0.807345908913
  0.92 ---- 0.827570830363
  0.93 ---- 0.848088257495
  0.94 ---- 0.868899386673
  0.95 ---- 0.890005406994
  0.96 ---- 0.911407500406
  0.97 ---- 0.933106841824
  0.98 ---- 0.955104599234
  0.99 ---- 0.977401933806
  </code></pre>