[orx-color] Fix package name, add Saturatable to ColorOKLCHa
This commit is contained in:
@@ -3,9 +3,9 @@ import org.openrndr.color.ColorRGBa
|
||||
import org.openrndr.draw.*
|
||||
import org.openrndr.extensions.SingleScreenshot
|
||||
import org.openrndr.extras.camera.Orbital
|
||||
import org.openrndr.extras.color.spaces.ColorOKLCHa
|
||||
import org.openrndr.extras.meshgenerators.sphereMesh
|
||||
import org.openrndr.math.Vector3
|
||||
import spaces.ColorOKLCHa
|
||||
import kotlin.math.cos
|
||||
|
||||
fun main() {
|
||||
|
||||
@@ -3,9 +3,9 @@ import org.openrndr.color.ColorRGBa
|
||||
import org.openrndr.draw.*
|
||||
import org.openrndr.extensions.SingleScreenshot
|
||||
import org.openrndr.extras.camera.Orbital
|
||||
import org.openrndr.extras.color.spaces.ColorOKLCHa
|
||||
import org.openrndr.extras.meshgenerators.sphereMesh
|
||||
import org.openrndr.math.Vector3
|
||||
import spaces.ColorOKLCHa
|
||||
import kotlin.math.cos
|
||||
|
||||
fun main() {
|
||||
|
||||
@@ -4,9 +4,9 @@ import org.openrndr.draw.loadFont
|
||||
import org.openrndr.extensions.SingleScreenshot
|
||||
import org.openrndr.extras.color.palettes.rangeTo
|
||||
import org.openrndr.extras.color.spaces.toHSLUVa
|
||||
import org.openrndr.extras.color.spaces.toOKLABa
|
||||
import org.openrndr.extras.color.spaces.toOKLCHa
|
||||
import org.openrndr.extras.color.spaces.toXSLUVa
|
||||
import spaces.toOKLABa
|
||||
import spaces.toOKLCHa
|
||||
|
||||
fun main() {
|
||||
application {
|
||||
|
||||
@@ -7,11 +7,11 @@ import org.openrndr.extensions.SingleScreenshot
|
||||
import org.openrndr.extras.camera.Orbital
|
||||
import org.openrndr.extras.color.palettes.rangeTo
|
||||
import org.openrndr.extras.color.spaces.toHSLUVa
|
||||
import org.openrndr.extras.color.spaces.toOKLABa
|
||||
import org.openrndr.extras.color.spaces.toOKLCHa
|
||||
import org.openrndr.extras.color.spaces.toXSLUVa
|
||||
import org.openrndr.extras.meshgenerators.sphereMesh
|
||||
import org.openrndr.math.Vector3
|
||||
import spaces.toOKLABa
|
||||
import spaces.toOKLCHa
|
||||
|
||||
fun main() {
|
||||
application {
|
||||
|
||||
@@ -2,10 +2,6 @@ package org.openrndr.extras.color.palettes
|
||||
|
||||
import org.openrndr.color.*
|
||||
import org.openrndr.extras.color.spaces.*
|
||||
import spaces.ColorOKLABa
|
||||
import spaces.ColorOKLCHa
|
||||
import spaces.toOKLABa
|
||||
import spaces.toOKLCHa
|
||||
|
||||
|
||||
fun <T> colorSequence(vararg offsets: Pair<Double, T>): ColorSequence
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package spaces
|
||||
package org.openrndr.extras.color.spaces
|
||||
|
||||
import org.openrndr.color.*
|
||||
import kotlin.math.pow
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package spaces
|
||||
package org.openrndr.extras.color.spaces
|
||||
|
||||
import org.openrndr.color.*
|
||||
import org.openrndr.math.mixAngle
|
||||
@@ -14,6 +14,7 @@ data class ColorOKLCHa(val l: Double, val c: Double, val h: Double, val a: Doubl
|
||||
OpacifiableColor<ColorOKLCHa>,
|
||||
ShadableColor<ColorOKLCHa>,
|
||||
HueShiftableColor<ColorOKLCHa>,
|
||||
SaturatableColor<ColorOKLCHa>,
|
||||
AlgebraicColor<ColorOKLCHa> {
|
||||
|
||||
companion object {
|
||||
@@ -33,6 +34,7 @@ data class ColorOKLCHa(val l: Double, val c: Double, val h: Double, val a: Doubl
|
||||
override fun opacify(factor: Double) = copy(a = a * factor)
|
||||
override fun shade(factor: Double) = copy(l = l * factor)
|
||||
override fun shiftHue(shiftInDegrees: Double) = copy(h = h + shiftInDegrees)
|
||||
override fun saturate(factor: Double) = copy(c = c * factor)
|
||||
|
||||
override fun plus(right: ColorOKLCHa) = copy(l = l + right.l, c = c + right.c, h = h + right.h, a = a + right.a)
|
||||
override fun minus(right: ColorOKLCHa) = copy(l = l - right.l, c = c - right.c, h = h - right.h, a = a - right.a)
|
||||
|
||||
Reference in New Issue
Block a user