The One with the Thoughts of Frans

Archive for October, 2010

Javascript Associative Array of SVG Color Keywords

I thought I needed an associative array of SVG color keywords. I couldn’t find one, so I created this. Enjoy.

// see http://www.w3.org/TR/SVG/types.html#ColorKeywords
var SVGColors = new Object();
SVGColors['aliceblue'] = [240,248,255];
SVGColors['antiquewhite'] = [250,235,215];
SVGColors['aqua'] = [0,255,255];
SVGColors['aquamarine'] = [127,255,212];
SVGColors['azure'] = [240,255,255];
SVGColors['beige'] = [245,245,220];
SVGColors['bisque'] = [255,228,196];
SVGColors['black'] = [0,0,0];
SVGColors['blanchedalmond'] = [255,235,205];
SVGColors['blue'] = [0,0,255];
SVGColors['blueviolet'] = [138,43,226];
SVGColors['brown'] = [165,42,42];
SVGColors['burlywood'] = [222,184,135];
SVGColors['cadetblue'] = [95,158,160];
SVGColors['chartreuse'] = [127,255,0];
SVGColors['chocolate'] = [210,105,30];
SVGColors['coral'] = [255,127,80];
SVGColors['cornflowerblue'] = [100,149,237];
SVGColors['cornsilk'] = [255,248,220];
SVGColors['crimson'] = [220,20,60];
SVGColors['cyan'] = [0,255,255];
SVGColors['darkblue'] = [0,0,139];
SVGColors['darkcyan'] = [0,139,139];
SVGColors['darkgoldenrod'] = [184,134,11];
SVGColors['darkgray'] = [169,169,169];
SVGColors['darkgreen'] = [0,100,0];
SVGColors['darkgrey'] = [169,169,169];
SVGColors['darkkhaki'] = [189,183,107];
SVGColors['darkmagenta'] = [139,0,139];
SVGColors['darkolivegreen'] = [85,107,47];
SVGColors['darkorange'] = [255,140,0];
SVGColors['darkorchid'] = [153,50,204];
SVGColors['darkred'] = [139,0,0];
SVGColors['darksalmon'] = [233,150,122];
SVGColors['darkseagreen'] = [143,188,143];
SVGColors['darkslateblue'] = [72,61,139];
SVGColors['darkslategray'] = [47,79,79];
SVGColors['darkslategrey'] = [47,79,79];
SVGColors['darkturquoise'] = [0,206,209];
SVGColors['darkviolet'] = [148,0,211];
SVGColors['deeppink'] = [255,20,147];
SVGColors['deepskyblue'] = [0,191,255];
SVGColors['dimgray'] = [105,105,105];
SVGColors['dimgrey'] = [105,105,105];
SVGColors['dodgerblue'] = [30,144,255];
SVGColors['firebrick'] = [178,34,34];
SVGColors['floralwhite'] = [255,250,240];
SVGColors['forestgreen'] = [34,139,34];
SVGColors['fuchsia'] = [255,0,255];
SVGColors['gainsboro'] = [220,220,220];
SVGColors['ghostwhite'] = [248,248,255];
SVGColors['gold'] = [255,215,0];
SVGColors['goldenrod'] = [218,165,32];
SVGColors['gray'] = [128,128,128];
SVGColors['green'] = [0,128,0];
SVGColors['greenyellow'] = [173,255,47];
SVGColors['grey'] = [128,128,128];
SVGColors['honeydew'] = [240,255,240];
SVGColors['hotpink'] = [255,105,180];
SVGColors['indianred'] = [205,92,92];
SVGColors['indigo'] = [75,0,130];
SVGColors['ivory'] = [255,255,240];
SVGColors['khaki'] = [240,230,140];
SVGColors['lavender'] = [230,230,250];
SVGColors['lavenderblush'] = [255,240,245];
SVGColors['lawngreen'] = [124,252,0];
SVGColors['lemonchiffon'] = [255,250,205];
SVGColors['lightblue'] = [173,216,230];
SVGColors['lightcoral'] = [240,128,128];
SVGColors['lightcyan'] = [224,255,255];
SVGColors['lightgoldenrodyellow'] = [250,250,210];
SVGColors['lightgray'] = [211,211,211];
SVGColors['lightgreen'] = [144,238,144];
SVGColors['lightgrey'] = [211,211,211];
SVGColors['lightpink'] = [255,182,193];
SVGColors['lightsalmon'] = [255,160,122];
SVGColors['lightseagreen'] = [32,178,170];
SVGColors['lightskyblue'] = [135,206,250];
SVGColors['lightslategray'] = [119,136,153];
SVGColors['lightslategrey'] = [119,136,153];
SVGColors['lightsteelblue'] = [176,196,222];
SVGColors['lightyellow'] = [255,255,224];
SVGColors['lime'] = [0,255,0];
SVGColors['limegreen'] = [50,205,50];
SVGColors['linen'] = [250,240,230];
SVGColors['magenta'] = [255,0,255];
SVGColors['maroon'] = [128,0,0];
SVGColors['mediumaquamarine'] = [102,205,170];
SVGColors['mediumblue'] = [0,0,205];
SVGColors['mediumorchid'] = [186,85,211];
SVGColors['mediumpurple'] = [147,112,219];
SVGColors['mediumseagreen'] = [60,179,113];
SVGColors['mediumslateblue'] = [123,104,238];
SVGColors['mediumspringgreen'] = [0,250,154];
SVGColors['mediumturquoise'] = [72,209,204];
SVGColors['mediumvioletred'] = [199,21,133];
SVGColors['midnightblue'] = [25,25,112];
SVGColors['mintcream'] = [245,255,250];
SVGColors['mistyrose'] = [255,228,225];
SVGColors['moccasin'] = [255,228,181];
SVGColors['navajowhite'] = [255,222,173];
SVGColors['navy'] = [0,0,128];
SVGColors['oldlace'] = [253,245,230];
SVGColors['olive'] = [128,128,0];
SVGColors['olivedrab'] = [107,142,35];
SVGColors['orange'] = [255,165,0];
SVGColors['orangered'] = [255,69,0];
SVGColors['orchid'] = [218,112,214];
SVGColors['palegoldenrod'] = [238,232,170];
SVGColors['palegreen'] = [152,251,152];
SVGColors['paleturquoise'] = [175,238,238];
SVGColors['palevioletred'] = [219,112,147];
SVGColors['papayawhip'] = [255,239,213];
SVGColors['peachpuff'] = [255,218,185];
SVGColors['peru'] = [205,133,63];
SVGColors['pink'] = [255,192,203];
SVGColors['plum'] = [221,160,221];
SVGColors['powderblue'] = [176,224,230];
SVGColors['purple'] = [128,0,128];
SVGColors['red'] = [255,0,0];
SVGColors['rosybrown'] = [188,143,143];
SVGColors['royalblue'] = [65,105,225];
SVGColors['saddlebrown'] = [139,69,19];
SVGColors['salmon'] = [250,128,114];
SVGColors['sandybrown'] = [244,164,96];
SVGColors['seagreen'] = [46,139,87];
SVGColors['seashell'] = [255,245,238];
SVGColors['sienna'] = [160,82,45];
SVGColors['silver'] = [192,192,192];
SVGColors['skyblue'] = [135,206,235];
SVGColors['slateblue'] = [106,90,205];
SVGColors['slategray'] = [112,128,144];
SVGColors['slategrey'] = [112,128,144];
SVGColors['snow'] = [255,250,250];
SVGColors['springgreen'] = [0,255,127];
SVGColors['steelblue'] = [70,130,180];
SVGColors['tan'] = [210,180,140];
SVGColors['teal'] = [0,128,128];
SVGColors['thistle'] = [216,191,216];
SVGColors['tomato'] = [255,99,71];
SVGColors['turquoise'] = [64,224,208];
SVGColors['violet'] = [238,130,238];
SVGColors['wheat'] = [245,222,179];
SVGColors['white'] = [255,255,255];
SVGColors['whitesmoke'] = [245,245,245];
SVGColors['yellow'] = [255,255,0];
SVGColors['yellowgreen'] = [154,205,50];

CommentsTags:

Oaths Are Silly

To a nice observer, it would have been worth while to remark the difference in tone and manner between the Resident and Havelaar on this occasion. Both had often attended such a solemnity [the reading of the decree of the Governor-General, whereby Mr. Max Havelaar was appointed Assistant Resident]; the difference which I refer to was not, therefore, occasioned by their being more or less affected by a novel and unwonted spectacle, but was only a consequence of the very different characters of the two persons. The Resident, it is true, spoke a little quicker than he was used to do, because he only had to read the decree and oaths, which saved him the trouble of seeking for the last words of what he had to say; but still all went on with a gravity and a seriousness which must have inspired the superficial spectator with a very high idea of the importance which he attached to this matter.

Havelaar, on the contrary, had something in expression of countenance, voice, and mien, when with uplifted finger he repeated the oath, as if he would say, “Of course, without ‘any oath,’ I should do that.” Any one having a knowledge of men would have had more confidence in his freedom from constraint than in the sedateness of the Resident. Is it not ridiculous indeed to think that the man whose vocation it is to do justice, the man into whose hands is given the weal or woe of thousands, should think himself bound by a few uttered sounds, if his heart does not feel itself obliged even without those sounds to do so (emphasis mine)?

We believe of Havelaar, that he would have protected the poor and oppressed wheresoever he might meet them, even if he had promised by “God Almighty” the reverse (emphasis mine).

From Max Havelaar by Multatuli.

Comments (1)Tags:

Damn, It Is Cold

Weather in fall always comes paired with temperature drops, fall storms, and lots of rain. But seldom did the temperature drop from 20°C to a mere 7°C from one day to the next.

The release of Ubuntu 10.10 coincided with this change for wintry weather; however, while I’m sure it’s swell, you won’t see me upgrading just yet. Perhaps I’ll have to look a little harder into acquiring a netbook so I can use it with the Ubuntu Netbook Edition.

Of more interest is the announcement that Opera 11 will have extensions. Or, more particularly, that I was the first to guess this in a contest.

Comments

How to Disable Opera Speed Dial

As far as I’m concerned there are two reasons for disabling speed dials: it’s faster, and your history doesn’t misbehave.

The speed is less relevant since Opera 10, although more relevant again since Opera 10.50. The history argument is far more important to me. It really throws me off that the first page I visited in a window still allows me to go back. I don’t know why someone would want to go back to the speed dial; isn’t it faster to just open a new one?

To disable the speed dial, you have you change the SpeedDialState setting in opera:config.

0: Folded
1: Shown
2: Read only, and always show speed dial
3: Disable speed dial

Set it to 3 to disable speed dial completely. If you think this will impair your ability to open pages quickly and easily, you need to take note of go to nickname (Shift + F2).

Comments

Google Calendar Synchronization

syncme.sebeta performs synchronization of Google Calendar with SyncML supporting cellphones in a manner that easily outperforms all other alternatives.

Opera Mini and this kind of calendar synchronization enable me to use my now over three years old Sony Ericsson s500i much like it were a modern smartphone. I realize the phone is as ubiquitous these days as the Nokia 3310 was in the early 2000s, but I take comfort in being a pioneer: I got the phone about one to two months after it came out.

But none of that is really relevant. If you use Google Calendar and a phone that supports SyncML, syncme.se might just be what you were looking for.

Comments