Move color functionality into subpackage of internal

This commit is contained in:
2024-09-05 22:46:58 -04:00
parent 45a6634e73
commit ac1a952b40
3 changed files with 8 additions and 8 deletions

View File

@@ -8,7 +8,7 @@ import "git.tebibyte.media/tomo/tomo/input"
import "git.tebibyte.media/tomo/tomo/event"
import "git.tebibyte.media/tomo/tomo/canvas"
import "git.tebibyte.media/tomo/objects/layouts"
import "git.tebibyte.media/tomo/objects/internal"
import icolor "git.tebibyte.media/tomo/objects/internal/color"
var _ tomo.Object = new(Swatch)
@@ -117,7 +117,7 @@ func (this *Swatch) Choose () {
updateHexInput := func () {
nrgba := color.NRGBAModel.Convert(colorPicker.Value()).(color.NRGBA)
hexInput.SetValue(internal.FormatNRGBA(nrgba))
hexInput.SetValue(icolor.FormatNRGBA(nrgba))
}
updateHexInput()
commit := func () {
@@ -130,7 +130,7 @@ func (this *Swatch) Choose () {
})
hexInput.OnConfirm(commit)
hexInput.OnValueChange(func () {
nrgba := internal.ParseNRGBA(hexInput.Value())
nrgba := icolor.ParseNRGBA(hexInput.Value())
this.userSetValue(nrgba)
colorPicker.SetValue(nrgba)
})