rgb: do not round value (#252)
This commit is contained in:
parent
0082c1fc87
commit
cb8858dc6f
2 changed files with 3 additions and 1 deletions
|
|
@ -2,6 +2,8 @@
|
|||
|
||||
## 0.41.3
|
||||
|
||||
- bug fixes
|
||||
- `rgb`: values were rounded even with `precision` different from `0`
|
||||
- osc
|
||||
- add support for utf8 string argments (encoded/decoded as per standard https://encoding.spec.whatwg.org/#utf-8)
|
||||
|
||||
|
|
|
|||
|
|
@ -141,7 +141,7 @@ module.exports = class Rgb extends Pad {
|
|||
|
||||
var rgb = hsbToRgb(this.hsb)
|
||||
for (var k in rgb) {
|
||||
rgb[k] = mapToScale(rgb[k], [0, 255], [this.getProp('range').min, this.getProp('range').max])
|
||||
rgb[k] = mapToScale(rgb[k], [0, 255], [this.getProp('range').min, this.getProp('range').max], false)
|
||||
}
|
||||
|
||||
if (rgb.r != this.value[0] || rgb.g != this.value[1] || rgb.b != this.value[2]) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue