@@ -168,10 +168,10 @@ var named = {
168168} ;
169169
170170define ( Color , color , {
171- copy : function ( channels ) {
171+ copy ( channels ) {
172172 return Object . assign ( new this . constructor , this , channels ) ;
173173 } ,
174- displayable : function ( ) {
174+ displayable ( ) {
175175 return this . rgb ( ) . displayable ( ) ;
176176 } ,
177177 hex : color_formatHex , // Deprecated! Use color.formatHex.
@@ -245,21 +245,21 @@ export function Rgb(r, g, b, opacity) {
245245}
246246
247247define ( Rgb , rgb , extend ( Color , {
248- brighter : function ( k ) {
248+ brighter ( k ) {
249249 k = k == null ? brighter : Math . pow ( brighter , k ) ;
250250 return new Rgb ( this . r * k , this . g * k , this . b * k , this . opacity ) ;
251251 } ,
252- darker : function ( k ) {
252+ darker ( k ) {
253253 k = k == null ? darker : Math . pow ( darker , k ) ;
254254 return new Rgb ( this . r * k , this . g * k , this . b * k , this . opacity ) ;
255255 } ,
256- rgb : function ( ) {
256+ rgb ( ) {
257257 return this ;
258258 } ,
259- clamp : function ( ) {
259+ clamp ( ) {
260260 return new Rgb ( clampi ( this . r ) , clampi ( this . g ) , clampi ( this . b ) , clampa ( this . opacity ) ) ;
261261 } ,
262- displayable : function ( ) {
262+ displayable ( ) {
263263 return ( - 0.5 <= this . r && this . r < 255.5 )
264264 && ( - 0.5 <= this . g && this . g < 255.5 )
265265 && ( - 0.5 <= this . b && this . b < 255.5 )
@@ -343,15 +343,15 @@ function Hsl(h, s, l, opacity) {
343343}
344344
345345define ( Hsl , hsl , extend ( Color , {
346- brighter : function ( k ) {
346+ brighter ( k ) {
347347 k = k == null ? brighter : Math . pow ( brighter , k ) ;
348348 return new Hsl ( this . h , this . s , this . l * k , this . opacity ) ;
349349 } ,
350- darker : function ( k ) {
350+ darker ( k ) {
351351 k = k == null ? darker : Math . pow ( darker , k ) ;
352352 return new Hsl ( this . h , this . s , this . l * k , this . opacity ) ;
353353 } ,
354- rgb : function ( ) {
354+ rgb ( ) {
355355 var h = this . h % 360 + ( this . h < 0 ) * 360 ,
356356 s = isNaN ( h ) || isNaN ( this . s ) ? 0 : this . s ,
357357 l = this . l ,
@@ -364,15 +364,15 @@ define(Hsl, hsl, extend(Color, {
364364 this . opacity
365365 ) ;
366366 } ,
367- clamp : function ( ) {
367+ clamp ( ) {
368368 return new Hsl ( clamph ( this . h ) , clampt ( this . s ) , clampt ( this . l ) , clampa ( this . opacity ) ) ;
369369 } ,
370- displayable : function ( ) {
370+ displayable ( ) {
371371 return ( 0 <= this . s && this . s <= 1 || isNaN ( this . s ) )
372372 && ( 0 <= this . l && this . l <= 1 )
373373 && ( 0 <= this . opacity && this . opacity <= 1 ) ;
374374 } ,
375- formatHsl : function ( ) {
375+ formatHsl ( ) {
376376 const a = clampa ( this . opacity ) ;
377377 return `${ a === 1 ? "hsl(" : "hsla(" } ${ clamph ( this . h ) } , ${ clampt ( this . s ) * 100 } %, ${ clampt ( this . l ) * 100 } %${ a === 1 ? ")" : `, ${ a } )` } ` ;
378378 }
0 commit comments