The Wiki for Tale 4 is in read-only mode and is available for archival and reference purposes only. Please visit the current Tale 11 Wiki in the meantime.

If you have any issues with this Wiki, please post in #wiki-editing on Discord or contact Brad in-game.

Difference between revisions of "User:Inkoaten/Raeli Colors"

From A Tale in the Desert
Jump to navigationJump to search
(→‎Raeli Colors: Fixing up the data and script)
Line 5: Line 5:
 
If you have any ideas or more data for this, please go ahead and put comments here or on the discussion page, or chat to me ingame.
 
If you have any ideas or more data for this, please go ahead and put comments here or on the discussion page, or chat to me ingame.
  
  This is all wrong. The conversion script is mangling S/L values. Fixme.
+
The accepted wisdom that hue and saturation are fixed per oven seems to be correct after all, I just had a bug in my conversion script :/
 
 
=== Hypotheses ===
 
 
 
* Convert color to HSV
 
* Hue = k1
 
* t = burn time / max burn time
 
* Saturation = t
 
* Value = 1.0 - k2 * t
 
* k1, k2 are determined by oven location and resin type?
 
  
 
=== To Do ===
 
=== To Do ===
Line 25: Line 16:
  
 
{| border="1" cellspacing="0" cellpadding="5"
 
{| border="1" cellspacing="0" cellpadding="5"
! Color !! Raw RGB !! RGB !! HSL || HSV
+
! rowspan="2"|Color !! colspan="3"|Raw RGB !! colspan="3"|RGB !! colspan="3"|HSL !! colspan="3"|HSV
 +
|-
 +
! R !! G !! B !! R !! G !! B !! H !! S !! L !! H !! S !! V
 
|-
 
|-
 
| White Smoke
 
| White Smoke
| 241   240   248
+
| 241 || 240 || 248
| 0.945 0.941 0.973
+
| 94.5% || 94.1% || 97.3%
| 247.5 0.016 0.016
+
| 247 || 36.4% || 95.7%
| 247.5 0.032 0.973
+
| 247 || 3.2% || 97.3%
 
 
 
|-
 
|-
 
| Lavender
 
| Lavender
| 236   234   245
+
| 236 || 234 || 245
| 0.925 0.918 0.961
+
| 92.5% || 91.8% || 96.1%
| 250.9 0.023 0.022
+
| 251 || 35.5% || 93.9%
| 250.9 0.045 0.961
+
| 251 || 4.5% || 96.1%
 
 
 
|-
 
|-
 
| Gainsboro
 
| Gainsboro
| 220   219   237
+
| 220 || 219 || 237
| 0.863 0.859 0.929
+
| 86.3% || 85.9% || 92.9%
| 243.3 0.039 0.035
+
| 243 || 33.3% || 89.4%
| 243.3 0.076 0.929
+
| 243 || 7.6% || 92.9%
 
 
 
|-
 
|-
 
| Light Grey
 
| Light Grey
| 207   204   231
+
| 207 || 204 || 231
| 0.812 0.800 0.906
+
| 81.2% || 80.0% || 90.6%
| 246.7 0.062 0.053
+
| 247 || 36.0% || 85.3%
| 246.7 0.117 0.906
+
| 247 || 11.7% || 90.6%
 
 
 
|-
 
|-
 
| Thistle
 
| Thistle
| 205   202   231
+
| 205 || 202 || 231
| 0.804 0.792 0.906
+
| 80.4% || 79.2% || 90.6%
| 246.2 0.067 0.057
+
| 246 || 37.7% || 84.9%
| 246.2 0.126 0.906
+
| 246 || 12.6% || 90.6%
 
 
 
|-
 
|-
 
| Light Steel Blue
 
| Light Steel Blue
| 197   193   228
+
| 197 || 193 || 228
| 0.773 0.757 0.894
+
| 77.3% || 75.7% || 89.4%
| 246.9 0.083 0.069
+
| 247 || 39.3% || 82.5%
| 246.9 0.154 0.894
+
| 247 || 15.4% || 89.4%
 
 
 
|-
 
|-
 
| Medium Purple
 
| Medium Purple
| 160   155   211
+
| 160 || 155 || 211
| 0.627 0.608 0.827
+
| 62.7% || 60.8% || 82.7%
| 245.4 0.153 0.110
+
| 245 || 38.9% || 71.8%
| 245.4 0.265 0.827
+
| 245 || 26.5% || 82.7%
 
 
 
|-
 
|-
 
| Slate Blue
 
| Slate Blue
| 126   119   197
+
| 126 || 119 || 197
| 0.494 0.467 0.773
+
| 49.4% || 46.7% || 77.3%
| 245.4 0.247 0.153
+
| 245 || 40.2% || 62.0%
| 245.4 0.396 0.773
+
| 245 || 39.6% || 77.3%
 
 
 
|-
 
|-
 
| Dark Slate Blue
 
| Dark Slate Blue
| 84   78   178
+
| 84 || 78 || 178
| 0.329 0.306 0.698
+
| 32.9% || 30.6% || 69.8%
| 243.6 0.391 0.196
+
| 244 || 39.4% || 50.2%
| 243.6 0.562 0.698
+
| 244 || 56.2% || 69.8%
 +
|}
 +
 
 +
==== Table generation ====
 +
 
 +
Table generated by this script:
 +
 
 +
<pre><nowiki>
 +
#!/usr/bin/env python
 +
 
 +
import sys
 +
 
 +
def rgb2hsl(r,g,b):
 +
    minc = min(r,g,b)
 +
    maxc = max(r,g,b)
 +
 
 +
    if maxc == minc: h = 0
 +
    elif maxc == r: h = (60 * (g-b)/(maxc-minc) + 360) % 360
 +
    elif maxc == g: h = (60 * (b-r)/(maxc-minc) + 120)
 +
    elif maxc == b: h = (60 * (r-g)/(maxc-minc) + 240)
 +
 
 +
    l = (maxc+minc) / 2.0
 +
 
 +
    if maxc == minc: s = 0.0
 +
    elif l <= 0.5: s = (maxc-minc) / (maxc+minc)
 +
    else: s = (maxc-minc) / (2 - (maxc+minc))
 +
 
 +
    return (h,s,l)
 +
 
 +
def rgb2hsv(r,g,b):
 +
    minc = min(r,g,b)
 +
    maxc = max(r,g,b)
  
|}
+
    if maxc == minc: h = 0
 +
    elif maxc == r: h = (60 * (g-b)/(maxc-minc) + 360) % 360
 +
    elif maxc == g: h = (60 * (b-r)/(maxc-minc) + 120)
 +
    elif maxc == b: h = (60 * (r-g)/(maxc-minc) + 240)
 +
 
 +
    if maxc == 0: s = 0.0
 +
    else: s = (maxc-minc) / maxc
 +
 
 +
    v = maxc
 +
 
 +
    return (h,s,v)
 +
 
 +
data=(
 +
  ('White Smoke', 241, 240, 248),
 +
  ('Lavender', 236, 234, 245),
 +
  ('Gainsboro', 220, 219, 237),
 +
  ('Light Grey', 207, 204, 231),
 +
  ('Thistle', 205, 202, 231),
 +
  ('Light Steel Blue', 197, 193, 228),
 +
  ('Medium Purple', 160, 155, 211),
 +
  ('Slate Blue', 126, 119, 197),
 +
  ('Dark Slate Blue', 84, 78, 178)
 +
)
 +
 
 +
print '{| border="1" cellspacing="0" cellpadding="5"'
 +
print '! rowspan="2"|Color !! colspan="3"|Raw RGB !! colspan="3"|RGB !! colspan="3"|HSL !! colspan="3"|HSV'
 +
print '|-'
 +
print '! R !! G !! B !! R !! G !! B !! H !! S !! L !! H !! S !! V'
 +
 
 +
for name, r, g, b in data:
 +
    print '|-'
 +
    print '| %s' % (name,)
 +
    print '| %d || %d || %d' % (r,g,b)
 +
 
 +
    r = r/255.0
 +
    g = g/255.0
 +
    b = b/255.0
  
=== Color conversion ===
+
    print '| %.1f%% || %.1f%% || %.1f%%' % (r*100.0,g*100.0,b*100.0)
  
Horrible Python script to convert RGB to HSL and HSV colorspaces:
+
    h,s,l = rgb2hsl(r,g,b)
 +
    print '| %.0f || %.1f%% || %.1f%%' % (h, s*100.0, l*100.0)
 +
    h,s,v = rgb2hsv(r,g,b)
 +
    print '| %.0f || %.1f%% || %.1f%%' % (h, s*100.0, v*100.0)
  
#!/usr/bin/env python
+
print '|}'
import sys
+
</nowiki></pre>
r = int(sys.argv[1])/255.0
 
g = int(sys.argv[2])/255.0
 
b = int(sys.argv[3])/255.0
 
minc = min(r,g,b)
 
maxc = max(r,g,b)
 
if maxc == minc: h = 0
 
elif maxc == r: h = (60 * (g-b)/(maxc-minc) + 360) % 360
 
elif maxc == g: h = (60 * (b-r)/(maxc-minc) + 120)
 
elif maxc == b: h = (60 * (r-g)/(maxc-minc) + 240)
 
l = (maxc-minc) / 2.0
 
if maxc == minc: hsl_s = 0.0
 
elif l <= 0.5: hsl_s = (maxc-minc) / (maxc+minc)
 
else: hsl_s = (maxc-minc) / (2 - (maxc+minc))
 
if maxc == 0: hsv_s = 0.0
 
else: hsv_s = (maxc-minc) / maxc
 
v = maxc
 
print "Raw: %5d %5d %5d" % (int(sys.argv[1]), int(sys.argv[2]), int(sys.argv[3]))
 
print "RGB: %5.3f %5.3f %5.3f" % (r,g,b)
 
print "HSL: %5.1f %5.3f %5.3f" % (h,hsl_s,l)
 
print "HSV: %5.1f %5.3f %5.3f" % (h,hsv_s,v)
 

Revision as of 01:00, 12 April 2009

Raeli Colors

Scratchpad area for working out Raeli color progressions.

If you have any ideas or more data for this, please go ahead and put comments here or on the discussion page, or chat to me ingame.

The accepted wisdom that hue and saturation are fixed per oven seems to be correct after all, I just had a bug in my conversion script :/

To Do

Get timing data, and just more data in general (e.g. automate taking a screenshot every 10 seconds over the course of the entire run)

cory0210's data

From Guilds/Akhetaton#Raeli Oven:

Color Raw RGB RGB HSL HSV
R G B R G B H S L H S V
White Smoke 241 240 248 94.5% 94.1% 97.3% 247 36.4% 95.7% 247 3.2% 97.3%
Lavender 236 234 245 92.5% 91.8% 96.1% 251 35.5% 93.9% 251 4.5% 96.1%
Gainsboro 220 219 237 86.3% 85.9% 92.9% 243 33.3% 89.4% 243 7.6% 92.9%
Light Grey 207 204 231 81.2% 80.0% 90.6% 247 36.0% 85.3% 247 11.7% 90.6%
Thistle 205 202 231 80.4% 79.2% 90.6% 246 37.7% 84.9% 246 12.6% 90.6%
Light Steel Blue 197 193 228 77.3% 75.7% 89.4% 247 39.3% 82.5% 247 15.4% 89.4%
Medium Purple 160 155 211 62.7% 60.8% 82.7% 245 38.9% 71.8% 245 26.5% 82.7%
Slate Blue 126 119 197 49.4% 46.7% 77.3% 245 40.2% 62.0% 245 39.6% 77.3%
Dark Slate Blue 84 78 178 32.9% 30.6% 69.8% 244 39.4% 50.2% 244 56.2% 69.8%

Table generation

Table generated by this script:

#!/usr/bin/env python

import sys

def rgb2hsl(r,g,b):
    minc = min(r,g,b)
    maxc = max(r,g,b)

    if maxc == minc: h = 0
    elif maxc == r: h = (60 * (g-b)/(maxc-minc) + 360) % 360
    elif maxc == g: h = (60 * (b-r)/(maxc-minc) + 120)
    elif maxc == b: h = (60 * (r-g)/(maxc-minc) + 240)

    l = (maxc+minc) / 2.0

    if maxc == minc: s = 0.0
    elif l <= 0.5: s = (maxc-minc) / (maxc+minc)
    else: s = (maxc-minc) / (2 - (maxc+minc))

    return (h,s,l)

def rgb2hsv(r,g,b):
    minc = min(r,g,b)
    maxc = max(r,g,b)

    if maxc == minc: h = 0
    elif maxc == r: h = (60 * (g-b)/(maxc-minc) + 360) % 360
    elif maxc == g: h = (60 * (b-r)/(maxc-minc) + 120)
    elif maxc == b: h = (60 * (r-g)/(maxc-minc) + 240)

    if maxc == 0: s = 0.0
    else: s = (maxc-minc) / maxc

    v = maxc

    return (h,s,v)

data=(
  ('White Smoke', 241, 240, 248),
  ('Lavender', 236, 234, 245),
  ('Gainsboro', 220, 219, 237),
  ('Light Grey', 207, 204, 231),
  ('Thistle', 205, 202, 231),
  ('Light Steel Blue', 197, 193, 228),
  ('Medium Purple', 160, 155, 211),
  ('Slate Blue', 126, 119, 197),
  ('Dark Slate Blue', 84, 78, 178)
)

print '{| border="1" cellspacing="0" cellpadding="5"'
print '! rowspan="2"|Color !! colspan="3"|Raw RGB !! colspan="3"|RGB !! colspan="3"|HSL !! colspan="3"|HSV'
print '|-'
print '! R !! G !! B !! R !! G !! B !! H !! S !! L !! H !! S !! V'

for name, r, g, b in data:
    print '|-'
    print '| %s' % (name,)
    print '| %d || %d || %d' % (r,g,b)

    r = r/255.0
    g = g/255.0
    b = b/255.0

    print '| %.1f%% || %.1f%% || %.1f%%' % (r*100.0,g*100.0,b*100.0)

    h,s,l = rgb2hsl(r,g,b)
    print '| %.0f || %.1f%% || %.1f%%' % (h, s*100.0, l*100.0)
    h,s,v = rgb2hsv(r,g,b)
    print '| %.0f || %.1f%% || %.1f%%' % (h, s*100.0, v*100.0)

print '|}'