OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <!-- | 2 <!-- |
3 Copyright 2016 The Chromium Authors. All rights reserved. | 3 Copyright 2016 The Chromium Authors. All rights reserved. |
4 Use of this source code is governed by a BSD-style license that can be | 4 Use of this source code is governed by a BSD-style license that can be |
5 found in the LICENSE file. | 5 found in the LICENSE file. |
6 --> | 6 --> |
7 | 7 |
8 <link rel="import" href="/tracing/base/color.html"> | 8 <link rel="import" href="/tracing/base/color.html"> |
9 <link rel="import" href="/tracing/base/iteration_helpers.html"> | |
10 <link rel="import" href="/tracing/base/math/math.html"> | 9 <link rel="import" href="/tracing/base/math/math.html"> |
| 10 <link rel="import" href="/tracing/base/utils.html"> |
11 | 11 |
12 <script> | 12 <script> |
13 'use strict'; | 13 'use strict'; |
14 tr.exportTo('tr.b', function() { | 14 tr.exportTo('tr.b', function() { |
15 /** | 15 /** |
16 * Generate pretty colors! | 16 * Generate pretty colors! |
17 * http://basecase.org/env/on-rainbows | 17 * http://basecase.org/env/on-rainbows |
18 * https://mycarta.wordpress.com/2012/10/06/the-rainbow-is-deadlong-live-the-r
ainbow-part-3/ | 18 * https://mycarta.wordpress.com/2012/10/06/the-rainbow-is-deadlong-live-the-r
ainbow-part-3/ |
19 * | 19 * |
20 * Set brightness = 0 to always generate black. | 20 * Set brightness = 0 to always generate black. |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
84 g = Math.round(g); | 84 g = Math.round(g); |
85 b = Math.round(b); | 85 b = Math.round(b); |
86 return 'rgba(' + r + ',' + g + ',' + b + ', ' + a + ')'; | 86 return 'rgba(' + r + ',' + g + ',' + b + ', ' + a + ')'; |
87 }; | 87 }; |
88 | 88 |
89 return { | 89 return { |
90 SinebowColorGenerator, | 90 SinebowColorGenerator, |
91 }; | 91 }; |
92 }); | 92 }); |
93 </script> | 93 </script> |
OLD | NEW |