diff --git a/DeathSocket/ColourServices.fs b/DeathSocket/ColourServices.fs index fb7d29b..1fec9e9 100644 --- a/DeathSocket/ColourServices.fs +++ b/DeathSocket/ColourServices.fs @@ -2,6 +2,8 @@ open System.Drawing open DeathSocket.Domain + open System + open SkiaSharp let makeBrushFromRGBASpec (spec: RGBASpec) = let a = int spec.alpha @@ -15,3 +17,8 @@ let colour = Color.FromArgb (a, r, g, b) new SolidBrush (colour) + let makeSkiaColour r g b = + let red = BitConverter.GetBytes (int r) + let green = BitConverter.GetBytes (int g) + let blue = BitConverter.GetBytes (int b) + new SKColor (red.[0], green.[0], blue.[0]) \ No newline at end of file diff --git a/DeathSocket/ImageServices.fs b/DeathSocket/ImageServices.fs index 8c0c490..190b796 100644 --- a/DeathSocket/ImageServices.fs +++ b/DeathSocket/ImageServices.fs @@ -67,7 +67,8 @@ use stroke = new SKPaint () stroke.Style <- SKPaintStyle.Stroke stroke.StrokeWidth <- float32 3 - stroke.Color <- SKColors.BlueViolet + //stroke.Color <- SKColors.BlueViolet + stroke.Color <- makeSkiaColour 123 123 123 // Note about generating colours in Skia Sharp. //stroke.Color <- new SKColor (byte 1000, byte 5111, byte 4225, byte 255) use imageFill = new SKPaint ()