OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2009 Apple Inc. All rights reserved. | 2 * Copyright (C) 2009 Apple Inc. All rights reserved. |
3 * Copyright (C) 2009 Joseph Pecoraro | 3 * Copyright (C) 2009 Joseph Pecoraro |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
7 * are met: | 7 * are met: |
8 * | 8 * |
9 * 1. Redistributions of source code must retain the above copyright | 9 * 1. Redistributions of source code must retain the above copyright |
10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
242 var c = Math.round(this._rgba[i] * 255); | 242 var c = Math.round(this._rgba[i] * 255); |
243 if (c % 17) | 243 if (c % 17) |
244 return false; | 244 return false; |
245 } | 245 } |
246 return true; | 246 return true; |
247 }, | 247 }, |
248 | 248 |
249 /** | 249 /** |
250 * @return {?string} | 250 * @return {?string} |
251 */ | 251 */ |
252 toString: function(format) | 252 asString: function(format) |
253 { | 253 { |
254 if (!format) | 254 if (!format) |
255 format = this._format; | 255 format = this._format; |
256 | 256 |
257 /** | 257 /** |
258 * @param {number} value | 258 * @param {number} value |
259 * @return {number} | 259 * @return {number} |
260 */ | 260 */ |
261 function toRgbValue(value) | 261 function toRgbValue(value) |
262 { | 262 { |
(...skipping 376 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
639 WebInspector.Color.Format = { | 639 WebInspector.Color.Format = { |
640 Original: "original", | 640 Original: "original", |
641 Nickname: "nickname", | 641 Nickname: "nickname", |
642 HEX: "hex", | 642 HEX: "hex", |
643 ShortHEX: "shorthex", | 643 ShortHEX: "shorthex", |
644 RGB: "rgb", | 644 RGB: "rgb", |
645 RGBA: "rgba", | 645 RGBA: "rgba", |
646 HSL: "hsl", | 646 HSL: "hsl", |
647 HSLA: "hsla" | 647 HSLA: "hsla" |
648 } | 648 } |
OLD | NEW |