diff --git a/exp/colors.py b/exp/colors.py new file mode 100644 --- /dev/null +++ b/exp/colors.py @@ -0,0 +1,19 @@ +def hex2int(): pass +def int2rgb(): pass +def rgb2hsv(): pass +def rgb2hsl(): pass + +def rgb2hsi(): + I=(red+green+blue)/255/3 + m=min(red,green,blue) + S=1-m/I + + +f=open("data.txt") # !! dir + +data=[line.split() for line in f] +f.close() + +for rec in data: rec[2]=hex2int(rec[2]) + + diff --git a/exp/data.txt b/exp/data.txt new file mode 100644 --- /dev/null +++ b/exp/data.txt @@ -0,0 +1,105 @@ +1 b 1e0c00 +1 b 271707 +1 b 1f0e06 +1 b 4b4217 +1 b 1c0b04 +1 w f7edc9 +1 w f6f0d0 +1 w f6f2d5 +1 w f6f2d9 +1 w f0ebc5 +1 e dd8e17 +1 e cb790b +1 e e3921d +1 e e8a027 +1 e f4c460 +2 b 4d2e11 +2 b 48371b +2 b 786a61 +2 b 643917 +2 b 583d20 +2 w f0c880 +2 w f7e5b7 +2 w f9e7b5 +2 w faeec8 +2 w fffbda +2 e cc922e +2 e e1b15d +2 e e6aa4a +2 e ce9f4d +2 e ebb761 +3 b 101010 +3 b 0c0c0c +3 b 110f10 +3 b 0b0d0c +3 b 0d0d0d +3 w 737872 +3 w 60635b +3 w 6c6d68 +3 w 766f67 +3 w 888e8c +3 e 7f5c3d +3 e 654727 +3 e 65462a +3 e 936f4d +3 e 785538 +4 b 252a24 +4 b 201b29 +4 b 181819 +4 b 211b23 +4 b 251e1e +4 w eef8fd +4 w f5faf8 +4 w d4eafb +4 w def1fb +4 w e8edfa +4 e af804d +4 e 9c7448 +4 e 83552e +4 e 9e7447 +4 e 845630 +5 b 221a13 +5 b 140b0c +5 b 1d1609 +5 b 1d1716 +5 b 271f20 +5 w eee1bc +5 w e6d9be +5 w f3e1bd +5 w f3e6d0 +5 w ede8d4 +5 e d8a112 +5 e d69413 +5 e e5ad34 +5 e f2b92e +5 e eaaf1f +7 b 261f17 +7 b 282117 +7 b 291c13 +7 b 1f1a14 +7 b 302718 +7 w dfd2a8 +7 w d8ca9d +7 w c9bb94 +7 w cfbc94 +7 w ceb78d +7 e a5671c +7 e ba7b2b +7 e c88e44 +7 e b57931 +7 e c68738 +8 b 371204 +8 b 311702 +8 b 3b1a03 +8 b 331a06 +8 b 391a01 +8 w f9e174 +8 w fbd772 +8 w fcca65 +8 w ffe574 +8 w ffd869 +8 e d97803 +8 e d67e04 +8 e dc8a0e +8 e dd8401 +8 e e88e08 \ No newline at end of file