Lucas4001MC Posted March 29, 2022 Share Posted March 29, 2022 It is exactly what the title says, I wonder if there is a plugin that exchanges saturation and value , for example I have a color with value = 50 and saturation = 62 and that when doing the plugin the color is value = 62 and saturation = 50 Quote Link to comment Share on other sites More sharing options...
BoltBait Posted March 30, 2022 Share Posted March 30, 2022 Here is a CodeLab script to do it: // Name: Swap S/V // Submenu: Color // Author: BoltBait // Version: 0.1 #region UICode #endregion void Render(Surface dst, Surface src, Rectangle rect) { for (int y = rect.Top; y < rect.Bottom; y++) { if (IsCancelRequested) return; for (int x = rect.Left; x < rect.Right; x++) { ColorBgra SrcPixel = src[x,y]; ColorBgra DstPixel = dst[x,y]; ColorBgra CurrentPixel = SrcPixel; HsvColor hsv = HsvColor.FromColor(CurrentPixel.ToColor()); int H = hsv.Hue; // 0-360 int S = hsv.Saturation; // 0-100 int V = hsv.Value; // 0-100 byte A = CurrentPixel.A; // 0-255 int TempV = V; V = S; S = TempV; CurrentPixel = ColorBgra.FromColor(new HsvColor(H,S,V).ToColor()); CurrentPixel.A = A; dst[x,y] = CurrentPixel; } } } 1 Quote Download: BoltBait's Plugin Pack | CodeLab | and a Computer Dominos Game Link to comment Share on other sites More sharing options...
MJW Posted March 30, 2022 Share Posted March 30, 2022 8 hours ago, Lucas4001MC said: It is exactly what the title says, I wonder if there is a plugin that exchanges saturation and value , for example There is: The HSV Scrambler Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.