Fully end to end encrypted anonymous chat program. Server only stores public key lookup for users and the encrypted messages. No credentials are transfered to the server, but kept in local browser storage. This allows 100% safe chatting.
https://safechat.ch
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
35 lines
751 B
35 lines
751 B
var nodes = require('../nodes') |
|
, hsla = require('./hsla') |
|
, component = require('./component'); |
|
|
|
/** |
|
* Return the saturation component of the given `color`, |
|
* or set the saturation component to the optional second `value` argument. |
|
* |
|
* Examples: |
|
* |
|
* saturation(#00c) |
|
* // => 100% |
|
* |
|
* saturation(#00c, 50%) |
|
* // => #339 |
|
* |
|
* @param {RGBA|HSLA} color |
|
* @param {Unit} [value] |
|
* @return {Unit|RGBA} |
|
* @api public |
|
*/ |
|
|
|
module.exports = function saturation(color, value){ |
|
if (value) { |
|
var hslaColor = color.hsla; |
|
return hsla( |
|
new nodes.Unit(hslaColor.h), |
|
value, |
|
new nodes.Unit(hslaColor.l), |
|
new nodes.Unit(hslaColor.a) |
|
) |
|
} |
|
return component(color, new nodes.String('saturation')); |
|
}; |
|
|
|
|