Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(483)

Delta Between Two Patch Sets: src/pkg/image/color/palette.go

Issue 10890045: code review 10890045: image/color: add Plan9Palette and WebSafePalette. (Closed)
Left Patch Set: diff -r 0d2b8690d896 https://go.googlecode.com/hg/ Created 10 years, 8 months ago
Right Patch Set: diff -r 000ecca1178d https://go.googlecode.com/hg/ Created 10 years, 8 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
« no previous file with change/comment | « src/pkg/image/color/gen.go ('k') | no next file » | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
1 // generated by go run gen.go; DO NOT EDIT 1 // generated by go run gen.go; DO NOT EDIT
2 2
3 package color 3 package color
4 4
5 // Plan9Palette is a 256-color palette that partitions the 24-bit RGB space 5 // Plan9Palette is a 256-color palette that partitions the 24-bit RGB space
6 // into 4×4×4 subdivision, with 4 shades in each subcube. Compared to the 6 // into 4×4×4 subdivision, with 4 shades in each subcube. Compared to the
7 // WebSafePalette, the idea is to reduce the color resolution by dicing the 7 // WebSafePalette, the idea is to reduce the color resolution by dicing the
8 // color cube into fewer cells, and to use the extra space to increase the 8 // color cube into fewer cells, and to use the extra space to increase the
9 // intensity resolution. This results in 16 gray shades (4 gray subcubes with 9 // intensity resolution. This results in 16 gray shades (4 gray subcubes with
10 // 4 samples in each), 13 shades of each primary and secondary color (3 10 // 4 samples in each), 13 shades of each primary and secondary color (3
(...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after
268 RGBA{0xff, 0xaa, 0xaa, 0xff}, 268 RGBA{0xff, 0xaa, 0xaa, 0xff},
269 RGBA{0xff, 0xaa, 0xff, 0xff}, 269 RGBA{0xff, 0xaa, 0xff, 0xff},
270 RGBA{0xff, 0xff, 0x00, 0xff}, 270 RGBA{0xff, 0xff, 0x00, 0xff},
271 RGBA{0xff, 0xff, 0x55, 0xff}, 271 RGBA{0xff, 0xff, 0x55, 0xff},
272 RGBA{0xff, 0xff, 0xaa, 0xff}, 272 RGBA{0xff, 0xff, 0xaa, 0xff},
273 RGBA{0xff, 0xff, 0xff, 0xff}, 273 RGBA{0xff, 0xff, 0xff, 0xff},
274 } 274 }
275 275
276 // WebSafePalette is a 216-color palette that was popularized by early versions 276 // WebSafePalette is a 216-color palette that was popularized by early versions
277 // of Netscape Navigator. It is also known as the Netscape Color Cube. 277 // of Netscape Navigator. It is also known as the Netscape Color Cube.
278 //
279 // See http://en.wikipedia.org/wiki/Web_colors#Web-safe_colors for details.
278 var WebSafePalette = []Color{ 280 var WebSafePalette = []Color{
279 RGBA{0x00, 0x00, 0x00, 0xff}, 281 RGBA{0x00, 0x00, 0x00, 0xff},
280 RGBA{0x00, 0x00, 0x33, 0xff}, 282 RGBA{0x00, 0x00, 0x33, 0xff},
281 RGBA{0x00, 0x00, 0x66, 0xff}, 283 RGBA{0x00, 0x00, 0x66, 0xff},
282 RGBA{0x00, 0x00, 0x99, 0xff}, 284 RGBA{0x00, 0x00, 0x99, 0xff},
283 RGBA{0x00, 0x00, 0xcc, 0xff}, 285 RGBA{0x00, 0x00, 0xcc, 0xff},
284 RGBA{0x00, 0x00, 0xff, 0xff}, 286 RGBA{0x00, 0x00, 0xff, 0xff},
285 RGBA{0x00, 0x33, 0x00, 0xff}, 287 RGBA{0x00, 0x33, 0x00, 0xff},
286 RGBA{0x00, 0x33, 0x33, 0xff}, 288 RGBA{0x00, 0x33, 0x33, 0xff},
287 RGBA{0x00, 0x33, 0x66, 0xff}, 289 RGBA{0x00, 0x33, 0x66, 0xff},
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after
486 RGBA{0xff, 0xcc, 0x99, 0xff}, 488 RGBA{0xff, 0xcc, 0x99, 0xff},
487 RGBA{0xff, 0xcc, 0xcc, 0xff}, 489 RGBA{0xff, 0xcc, 0xcc, 0xff},
488 RGBA{0xff, 0xcc, 0xff, 0xff}, 490 RGBA{0xff, 0xcc, 0xff, 0xff},
489 RGBA{0xff, 0xff, 0x00, 0xff}, 491 RGBA{0xff, 0xff, 0x00, 0xff},
490 RGBA{0xff, 0xff, 0x33, 0xff}, 492 RGBA{0xff, 0xff, 0x33, 0xff},
491 RGBA{0xff, 0xff, 0x66, 0xff}, 493 RGBA{0xff, 0xff, 0x66, 0xff},
492 RGBA{0xff, 0xff, 0x99, 0xff}, 494 RGBA{0xff, 0xff, 0x99, 0xff},
493 RGBA{0xff, 0xff, 0xcc, 0xff}, 495 RGBA{0xff, 0xff, 0xcc, 0xff},
494 RGBA{0xff, 0xff, 0xff, 0xff}, 496 RGBA{0xff, 0xff, 0xff, 0xff},
495 } 497 }
LEFTRIGHT

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b