Skip to content

Instantly share code, notes, and snippets.

@aben
aben / Solarized_Rock.yaml
Last active July 30, 2017 00:20
Solarized scheme for squirrel
solarized_rock:
name: "曬經石/Solarized Rock"
author: "Aben <[email protected]>, based on Ethan Schoonover's Solarized color scheme"
corner_radius: 7 #圓角
border_height: 0
border_width: 0
back_color: 0x362b00 #背景色
candidate_text_color: 0x969483 #候選字顏色
hilited_candidate_back_color: 0x8236d3 #高亮候選字背景色
hilited_candidate_text_color: 0xffffff #高亮候選字顏色
@mathebox
mathebox / color_conversion.py
Created April 12, 2015 16:47
Python methods to convert colors between RGB, HSV and HSL
import math
def rgb_to_hsv(r, g, b):
r = float(r)
g = float(g)
b = float(b)
high = max(r, g, b)
low = min(r, g, b)
h, s, v = high, high, high