OLD | NEW |
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 #import('dart:html'); | 5 #import('dart:html'); |
| 6 #import('dart:math', prefix: 'Math'); |
6 | 7 |
7 class Color { | 8 class Color { |
8 int hue; | 9 int hue; |
9 double saturation; | 10 double saturation; |
10 double lightness; | 11 double lightness; |
11 | 12 |
12 Color(int this.hue, double this.saturation, double this.lightness); | 13 Color(int this.hue, double this.saturation, double this.lightness); |
13 | 14 |
14 factory Color.rgb(double red, double green, double blue) { | 15 factory Color.rgb(double red, double green, double blue) { |
15 final r = red; | 16 final r = red; |
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
188 | 189 |
189 document.query("input[name=invert]").on.change.add((Event e) { | 190 document.query("input[name=invert]").on.change.add((Event e) { |
190 InputElement invert = e.target; | 191 InputElement invert = e.target; |
191 if (invert.checked) { | 192 if (invert.checked) { |
192 logo.classes = ['inverse']; | 193 logo.classes = ['inverse']; |
193 } else { | 194 } else { |
194 logo.classes = []; | 195 logo.classes = []; |
195 } | 196 } |
196 }); | 197 }); |
197 } | 198 } |
OLD | NEW |