Skip to content

Instantly share code, notes, and snippets.

@kovaca
Created December 30, 2022 04:45
Show Gist options
  • Select an option

  • Save kovaca/32f744818f29bb77efd174583f0954eb to your computer and use it in GitHub Desktop.

Select an option

Save kovaca/32f744818f29bb77efd174583f0954eb to your computer and use it in GitHub Desktop.
pour one out for the Dark Sky weather app temperature palette
import matplotlib
#sampled from screenshot
hexes = ['#010100',
'#030100',
'#060201',
'#0d0201',
'#130401',
'#1b0501',
'#230601',
'#2b0801',
'#340a01',
'#3d0c01',
'#460e01',
'#501101',
'#591301',
'#621602',
'#6c1903',
'#751c04',
'#7f1f05',
'#8a2206',
'#942508',
'#9f2809',
'#aa2b0b',
'#b42f0d',
'#bf330f',
'#c93711',
'#d23c14',
'#da4016',
'#e24519',
'#e94b1c',
'#ef511f',
'#f35823',
'#f66027',
'#f8692c',
'#f87231',
'#f87c36',
'#f9863b',
'#f99041',
'#f99a47',
'#f9a34d',
'#f9ad53',
'#f9b559',
'#f9be60',
'#f9c668',
'#f9cf73',
'#f9d881',
'#f8e191',
'#f8e9a2',
'#f7efb3',
'#f6f4c0',
'#f4f7ca',
'#f0f9d0',
'#eaf9d1',
'#e3f8cf',
'#dbf6cc',
'#d2f3c7',
'#c9f0c1',
'#bfebba',
'#b4e6b5',
'#a8e1b1',
'#9ddcae',
'#91d6ae',
'#86cfae',
'#79c8b0',
'#6dc1b2',
'#60bab5',
'#54b2b7',
'#47aaba',
'#3aa2bb',
'#2f9abc',
'#2693bc',
'#1f8bbb',
'#1c83b9',
'#1a7cb6',
'#1a74b2',
'#1a6dac',
'#1965a6',
'#195d9f',
'#195698',
'#194e90',
'#1a4789',
'#1a3f82',
'#1a387b',
'#1a3175',
'#1a2b6f',
'#1b266b',
'#1c2267',
'#1f1f64',
'#221d63',
'#261c63',
'#2c1c64',
'#321c67',
'#391d6a',
'#411d6d',
'#491e72',
'#512076',
'#59227b',
'#60247f',
'#672683',
'#6d2886',
'#722a88',
'#762b88',
'#782c87',
'#782c86',
'#772b84',
'#752b82',
'#732a7f',
'#70297c',
'#6d2778',
'#6a2674',
'#672570',
'#63236c',
'#5f2267',
'#5a2062',
'#561f5c',
'#511d56',
'#4c1b51',
'#47194b',
'#431846',
'#3e1642',
'#39153d',
'#351338',
'#301133',
'#2b102e',
'#270e29',
'#220d24',
'#1e0b1f',
'#1a091b',
'#170818',
'#150816']
cmap = matplotlib.colors.LinearSegmentedColormap.from_list('dark_sky_temp',[matplotlib.colors.hex2color(i) for i in hexes])
cmap
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment