Jump to content

Search the Community

Showing results for tags 'color'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • Information
    • Forum Rules
    • Paint.NET Search
    • Official Paint.NET website
    • Help Files (paint.net's online documentation)
  • Paint.NET
    • Paint.NET Discussion and Questions
    • The Pictorium
    • Tutorials - Publishing ONLY!
    • Competitions
    • Plugins - Publishing ONLY!
    • Troubleshooting & Bug Reports
  • Off-Topic
    • Grand Theory of Everything
  • Paint.NET Programming / Development
    • Plugin Developer's Central
    • Preview Center
    • Translation and Localization

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...


  • Start



Website URL






  1. Hi All, This plugin is an improvement on Jotaf's Grim Color Reaper. I use this plugin a lot but wanted some improvements, suddenly I realized that the since I can code a little and I can use the skill (?) . As, Jotaf has mentioned in his post that it is opensource, so I made one mine on Codelab version 3.3. The enhancement it has that It lets you now to choose color through UI instead of going through selecting primary color. It also has an option for keeping color i.e. while Grim Color Reaper 'kills' a specific color, Kill Color Keeper has an option to preserve specific color while killing every other one. User Interface: UI is similar to Grim reaper. It has options for tolerance and cut off value. But as a significant improvement, that it has Color Wheel inside UI so you can pick up color as desired. Default is still Primary Color. There are two option for Keep color and Kill color. There are two sliders which are dedicated to these two functions. I could have made it work with same slider, but default value for kill Color always turned out to make whole image transparent for Keep Color Option. Also, there was a need of different slider description . So, I made two dedicated sliders for them with their own default value and own description. In version 1.1, there are two sliders: Function Kill Color has only one slider for it while Keep Color has two sliders dedicated to it. 1. Original Image: 2. Kill color white i.e. background. 3. Keep Color Blue i.e. for dresses here. (Please ignore mistakes in UI name & values, this screen print was taken before final DLL was built.) Versions 1.1 In Keep Color Option if the original image pixel were transparent like this Then Keep Color Options would turn transparent pixels in white color (i.e there were given some opacity while running effect). So new version checks that if Alpha is less than given threshold values. I used first sliders to ignore less opaque pixels. UI is changed, now both sliders will active for Keep Color and only first slider is active for Kill Color. Versions 1.2 Updated UI to select Color. Source Code: Kill Color Keeper.cs I personally call it 'Color keeper' but didn't wanted to leave word 'Kill', I choose one between these two candidates: "Keep Color Killer" and "Kill Color Keeper". I hope you all will find it useful. Download here: Download
  2. The Color Clearer plugin makes pixels that match the selected color transparent, and modifies the transparency and color of the other pixels to maximize their transparency while still producing the original color when blended with the normal blending mode to a background set to the selected color. It some sense, it removes as much of the selected color as possible from each pixel. Here is the (still simple) user interface: The Make Transparent Pixels Transparent White check box specifies that transparent pixels will be set to transparent white, rather than have their colors remain unchanged. I was careful to try to make the blended image after Color Clearer exactly match the original blended image, even when the original pixels are partially transparent. I hope I succeeded. Interestingly (I think), all the math is done using integer arithmetic. I attempted to do the same thing in HSV Eraser, but I didn't take into account the precise way PDN alpha-blends layers, so there were many cases where the resultant blended pixels were off by one. Here's an example, using an image from a previous discussion. The original image is: After using the Color Picker to choose the red background color, then running Color Clearer, the result is: If the second image is placed on top of a layer filled with the background color, the merged layers match the original image. Here is the DLL: ColorClearer.zip Maximilian has a 3.5.11 version. Here is the CodeLab code: EDIT: As noted next to the DLL, I intend to modify the plugin to choose better replacement colors. The current values work, in that the produce the proper colors when blended with the background color, but they are sometimes somewhat illogical choices. EDIT 2: A new version. I changed the color used when a number of colors will produce the correct blended result. I now choose the color that's nearest to the original color. For consistency, I left completely transparent pixels unchanged (except for alpha), unless an option is selected to make them transparent white.
  3. This plugin is admittedly quite similar to TR's Custom Palette Matcher, but may be useful. It's in the Color menu. The Plugin: Recolor Using Palette.zip As the Help menu says: Recolor Using Palette replaces each pixel color with the nearest color from a specified range of the current palette. The Euclidean distance is used. This minimizes the sum of the squared differences of the red, green, and blue color components. The controls are: Starting Palette Index: The number of the first palette color to use. Palette colors are numbered from 1 to 96. Ending Palette Index: The number of the last palette color to use. Ignore Opacity When Comparing Colors: When this option is enabled, only the red, green, and blue color components are compared; the alpha value is ignored. The original alpha is preserved in the replaced color. When this option is disabled, the image and palette colors are adjusted to account for their alpha values before being compared. The distance between colors is the distance between the colors when blended with the background color that maximizes the distance. The original alpha is replaced by the alpha of the nearest palette color. Show Original Image: When enabled, the original, unmodified image is displayed. The UI: Instead of managing palettes like TR's effect, it relies on PDN's built-in palette handling, which I think is fairly easy to use. Recolor Using Palette allows a subrange of the current palette to be used. (Note the color-entry numbering is one-based, not zero-based.) On interesting (which is not necessarily the same as useful) feature is that it can take opacity into account when doing the comparison. When opacity is used in the comparison, the entire palette color, including alpha, replaces the image color; otherwise, the image alpha is preserved, and only the red, green, and blue are replaced. Here's a demonstration, using the default palette. Original image: With Ignore Opacity When Comparing Colors enabled: With Ignore Opacity When Comparing Colors disabled: (To be useful in this mode, the palette would likely need to be better suited to the image than it is in this case.) Ignore Opacity When Comparing Colors is disabled by default.
  4. Hello, I've made an effect that converts pixels to a single color and adjusts the alpha value based on deviation from that color. Essentially it's a grayscale to alpha converter, capable of extracting black or white objects from a background of the other color, but it could be used with other colors as well. Should the image contain alpha values already, it can be blended with the calculated alpha. The resulting image has only one RGB color, with all variation in the alpha channel only. Download the plugin Menu: Effects > Color Why this plugin? There are multiple plugin packs (1, 2) that advertise begin able to perform the same task or similar tasks. However, I've found that they do not function quite as I'd like, or maybe I've misunderstood how to use them. Nevertheless, this plugin is as easy to use as it gets. To install, extract the folder and run the batch install file, or locate your paint.net effects and paste the .dll file there manually. I would also appreciate any feedback on the plugin! Maybe you have an edge case for which it doesn't work, or an improvement that should be made. EDIT: Updated and renamed plugin, title and description
  5. Back with my second plugin. This time I made a plugin that can be used to easily and quickly create a gradient mapping effect using 2 colors. I know pyrochild already made a gradient mapping tool, but this is just a simplified version using only 2 colors for dark and light tones. I added some options for post processing as well, like contrast and blending mode. Download: DuotoneGradientMap.zip Preview: Code: (I’m still a beginner in C#, please don’t hurt me) // Name: Duotone Gradient Map // Submenu: Color // Author: Pascal // Title: Duotone Gradient Map // Version: 1.0 // Desc: Easy and quick way of gradient mapping // Keywords: // URL: // Help: #region UICode ColorWheelControl Amount1 = ColorBgra.FromBgr(0, 0, 0); // Dark ColorWheelControl Amount2 = ColorBgra.FromBgr(255, 255, 255); // Light IntSliderControl Amount3 = 100; // [0,100] Amount IntSliderControl Amount4 = 0; // [0,1000] Contrast ListBoxControl Amount5 = 0; // Blending mode|Normal|Multiply|Darken|Lighten|Additive #endregion void Render(Surface dst, Surface src, Rectangle rect) { ColorBgra Primary = Amount1; ColorBgra Secondary = Amount2; ColorBgra Cp; //current pixel ColorBgra Np; //new pixel for (int y = rect.Top; y < rect.Bottom; y++) { if (IsCancelRequested) return; for (int x = rect.Left; x < rect.Right; x++) { Cp = src[x,y]; //control parameters double A = ((double)Amount3)/100; //amount double C = (double)Amount4; //contrast int M = Amount5; //blending mode //get rgb double R = Cp.R; double G = Cp.G; double B = Cp.B; //value double P = ((R+G+B)/3)/255; //luminosity //get colors double Rp = Primary.R; double Rs = Secondary.R; double Gp = Primary.G; double Gs = Secondary.G; double Bp = Primary.B; double Bs = Secondary.B; //calculate new color R = Norm((P*Rs + (1-P)*Rp)*A + (1-A)*R, 255); G = Norm((P*Gs + (1-P)*Gp)*A + (1-A)*G, 255); B = Norm((P*Bs + (1-P)*Bp)*A + (1-A)*B, 255); //apply new color and contrast Np = ColorBgra.FromBgra( (byte)Norm(Con(B, C), 255), (byte)Norm(Con(G, C), 255), (byte)Norm(Con(R, C), 255), Cp.A); //BLENDING MODES //multiply if(M == 1){ Cp.R = (byte)Norm((Cp.R * Np.R/255)*A + Cp.R*(1-A), 255); Cp.G = (byte)Norm((Cp.G * Np.G/255)*A + Cp.G*(1-A), 255); Cp.B = (byte)Norm((Cp.B * Np.B/255)*A + Cp.B*(1-A), 255); } //darken else if(M == 2){ if(Np.R < Cp.R){ Cp.R = Np.R; } if(Np.G < Cp.G){ Cp.G = Np.G; } if(Np.B < Cp.B){ Cp.B = Np.B; } } //lighten else if(M == 3){ if(Np.R > Cp.R){ Cp.R = Np.R; } if(Np.G > Cp.G){ Cp.G = Np.G; } if(Np.B > Cp.B){ Cp.B = Np.B; } } //additive else if(M == 4){ Cp.R = (byte)Norm(Cp.R + Np.R*A, 255); Cp.G = (byte)Norm(Cp.G + Np.G*A, 255); Cp.B = (byte)Norm(Cp.B + Np.B*A, 255); } //normal else{ Cp = Np; } dst[x,y] = Cp; } } } //normalize double Norm(double x, int i){ if(x > i){ x = i; } if(x < 0){ x = 0; } return x; } //contrast double Con(double x, double c){ x /= 255; double y; if(x <= 0.5){ y = 0.5 * Math.Pow(2*x, (c/500)+1); } else{ y = 1 - 0.5 * Math.Pow(2 - 2*x, (c/500)+1); } return y*255; }
  6. New version available! This plugin can be used to simulate certain colorblindness types such as: protanopia, protanomaly, deuteranopia, deuteranomaly, tritanopia, tritanomaly, achromatopsia and achromatomaly. Download: Colorblindness4.zip Can be found in Effects > Color > Colorblindness Preview: Code: // Name: Colorblindness // Submenu: Color // Author: Pascal // Title: Colorblindness // Version: 4.0.0 // Desc: // Keywords: // URL: // Help: #region UICode ListBoxControl<Btype> btype = 0; //Color blindness type|Protanopia #endregion enum Btype{ Protanopia, Protanomaly, Deuteranopia, Deuteranomaly, Tritanopia, Tritanomaly, Achromatopsia, Achromatomaly, Default } 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 CurrentPixel = src[x,y]; byte r = CurrentPixel.R, g = CurrentPixel.G, b = CurrentPixel.B; byte R, G, B; switch(btype){ case Btype.Protanopia: R = (byte)(0.567 * r + 0.433 * g); G = (byte)(0.558 * r + 0.432 * g); B = (byte)(0.242 * g + 0.758 * b); break; case Btype.Deuteranopia: R = (byte)(0.625 * r + 0.375 * g); G = (byte)(0.7 * r + 0.3 * g); B = (byte)(0.3* g + 0.7 * b); break; case Btype.Tritanopia: R = (byte)(0.950 * r + 0.05 * g); G = (byte)(0.433 * g + 0.567 * b); B = (byte)(0.475* g + 0.525 * b); break; case Btype.Protanomaly: R = (byte)(0.817 * r + 0.183 * g); G = (byte)(0.333 * r + 0.667 * g); B = (byte)(0.125 * g + 0.875 * b); break; case Btype.Deuteranomaly: R = (byte)(0.8 * r + 0.2 * g); G = (byte)(0.258 * r + 0.742 * g); B = (byte)(0.142 * g + 0.858 * b); break; case Btype.Tritanomaly: R = (byte)(0.967 * r + 0.033 * g); G = (byte)(0.733 * g + 0.267 * b); B = (byte)(0.183 * g + 0.817 * b); break; case Btype.Achromatopsia: R = (byte)(0.299 * r + 0.587 * g + 0.114 * b); G = (byte)(0.299 * r + 0.587 * g + 0.114 * b); B = (byte)(0.299 * r + 0.587 * g + 0.114 * b); break; case Btype.Achromatomaly: R = (byte)(0.618 * r + 0.32 * g + 0.062 * b); G = (byte)(0.163 * r + 0.775 * g + 0.062 * b); B = (byte)(0.163 * r + 0.32 * g + 0.516 * b); break; default: R = r; G = g; B = b; break; } dst[x,y] = ColorBgra.FromBgra(limit(B), limit(G), limit(R), CurrentPixel.A); } } } private byte limit(byte p){ if(p > 255){p = 255;} if(p < 0){p = 0;} return p; }
  7. Plugin for converting images to old style tile-based graphic. Video demo Example: Interface (ENG ver avaliable): Avaliable palettes: CGA - 3 pal's; MSX1 - screen mode 1; MSX2 - 4 color palette; ZX Spectrum - standart graphic; Posterization 1-3 bit. For paint.net version 4.2.10 Download Supprot me for more plugins :3
  8. AdvDith-en.zipAdvDith - dithering effect used 2 color (black & white). Interface (ENG lang avaliable) Avaliable desaturation algorithms: ITU-R BT.2100; ITU-R BT.709; ITU-R BT.601; MAXMIN2; Pifagor; Only red; Only green; Only blue; Average. Dithering algorithms: Ordered 2x2, 3x3, 4x4, 8x8 - Bayer dither. Mpre(i,j) = (Mint(i,j)+1) / n^2 - 0.5; Lines vertical/horizontal; Floyd-Steinberg, Floyd false; Jarvis-Judice-Ninke; Stucki; Burkes; Sierra3, Sierra2, Sierra2-4A; Atkinson; Random. For Paint.net v4.2.12. Download Supprot me for more plugins :3
  9. This is very simple effect which allows to eliminate dark or light areas of the image. Good deletes black or white color (as a special case of dark or light, respectively). The effect has a very simple interface. You can find it under Effects-> Color-> Eliminate Dark/Light. Download from my PluginPack Original image: Eliminate dark areas: Eliminate light areas: Below the sourse code for CodeLab. This is аn icon for the effect: P.S. I decided to start a new topic, because the former name of the topic Eliminate Black/Eliminate White was wrong.
  10. Color > Color Magic It's been a while since I've posted here. I'm currently in the process of reorganizing/revamping my plugins as well as developing new ones. Color Magic This plugin lets you recolor an image in a pretty wide variety of ways with a lot of fine-tuning. It's designed in such a way to keep colors at reasonable proportions to one another, meaning that unlike other coloring effects (including even the regular Hue adjustment) , these hue shifts look quite natural. While it will probably take a lot of experimentation to get something in particular, the controls make minor changes which allow you to tweak things very easily. In any case, let's take a look at what the plugin looks like: Use -- Feeds different things into the Hue. The default setting is the normal image, which still allows you to use the other sliders for different effects. Smoothness -- Determines how "smooth" the recoloring is. Values smaller than 1 will have much wider gulfs between hues, allowing you to make things be 2-color or 3-color pretty easily, while values higher than 1 make the effect more pronounced, and at high values will make things take on a "heat map" or psychedelic appearance. Filter -- Filters out a specific range of hues from appearing. At 360, all hues *can* appear (they won't necessarily because of how the plugin works). The setting starts at purple and slowly removes hue ranges, going to blue, to green, to yellow, to orange and eventually at 0 only red will appear. Hues that have been "filtered" will bounce around inside the allowed range, maintaining their proportionality with other hues and not wrapping around randomly. As a result you get some pretty smooth transitions, though artifacts will appear sometimes. Final Hue -- Lets you adjust the final hue of the image after all the other effects are done. Now then, let's look at what some of these settings actually do. We'll start with a normal image of Barack Obama. I tried to keep the image size set to what other tutorials use here, but it has been a while since I posted here, so mods tell me if I need to resize anything. Adjusting the Smoothness slider will do things like this. You're basically recoloring hues in proportionate ways -- red/brown things change very little while blue things change a lot. There are some artifacts on the image to the right, which we can fix with the Filter setting: No artifacts in either of these cases, though the hue of Obama's suit is also different. With a lot of tweaking, it is possible to find a dark green variant that does what you want it to do. That tends to be where the Use setting comes in. Here's a tall image comparing different Use settings, with the normal image on the left for comparison. In a couple cases I've also adjusted the smoothness because the default values need some tweaking still. Again, mods let me know if the image is too tall or something (I still have all the originals). What these different settings do is basically proportionately transform some element(s) of the image into a hue. So for example, in the saturation setting, parts of the image that are less saturated will turn red while parts of the image which are more saturated will become blue or purple. From here you can adjust the Smoothness setting to spread those proportions out or bunching them together, the Filter setting to constrain specific hues and the Final Hue setting to get a final result. In any case, if nothing else this plugin should be fun to experiment around with. Here's a link to the DLL: https://github.com/Xhin23/Paint.net-Plugins/blob/master/Color_Magic.dll
  11. During a frustrating run of having to swap and replace 20+ colors and potentially more in the future to give my pixel art a better look and feel, I made a plugin that allows you to swap and change colors though typing them in a list. The plugin also has the ability to manipulate annoying alpha colors that plugins sometimes generate. Setting alpha to 255 reveals all of those ugly alpha leftovers! There is also the option of using an incremental palette, which clamps RGB colors to increments of a value. Useful for limiting colors to a known value that you can manipulate easier such as feeding those values back to the list to be changed again or for converting images to be processed for pixel art with various other plugins. Can be found in Effects -> Color -> Replace Colors + Palette This does not replace selective palette plugins or color reducing plugins as this is different from those. Using certain increment counts will give a good visual style to your images. It will not work well with artifacts and graininess as you can see from these images. Pixelart is the best choice if you want to make use of this feature to its fullest. The incremental palette clamps colors to an increment of a value. For example, using 50 will transform 54 to 50 and 165 to 150. This is the simplest way to convert an image to a simple palette which also gives you some room to manipulate colors more. Be sure to use a color picker program in case you want to change the colors created from it. Example: --black becomes 10 10 10 0,0,0=10,10,10 --uses commas and no spaces --20 20 20 becomes black 20 20 20=0 0 0 --spaces instead of commas --you can keep going affecting colors as you go Proper Regex was used in the text window to allow you to change one color to another. You can use spaces, no spaces, or commas to your liking. If you have to use multiple lists to change colors I recommend using a text editor to manage them then copy and paste what you want. Using a large list of too many color changes may cause slowdowns. Replace Colors + Palette.dll
  12. This plugin can be useful for selecting objects in the image or for creation a color mask of object. The plugin is based on the script of Color Target plugin by @rwp80. You can find it: Effects -> Color -> Color Range Download from my PluginPack This effect allows you to create a color mask of object in the image. You can then select the object using Magic Wand ( ) for further work with him. See short tutorial and examples of effect's work in the Color Range Test topic. CodeLab script: and icon: Examples of effect's technique you can found in How To Use Color Range effect topic. Примеры работы эффекта и приемы работы с ним вы можете посмотреть в уроке Как использовать эффект 'Цветовой диапазон'.
  13. Description: This effect converts each pixel brightness to hue spectrum color. Plugin has one slider to set spectrum offset. Plugin: Effects > Color > Trippy rainbow Examples: Github: https://github.com/PavielKraskouski/PaintDotNetPlugins/tree/master/TrippyRainbow Download: TrippyRainbow.dll
  14. RGB Compositor Effects -> Color -> RGB Compositor Description This will use a single channel from each photo to compose a full RGB value for the final image. The 8-Bit Guy on YouTube explains it well. NOTE: All three photos need to be the same size as your canvas. NOTE: No, this will not magically turn a Black and White photo to a color photo. Before (An image for each color channel) Red Green Blue After (Composed) Changelog v1.0 (Jan 6, 2019) Initial release Download RGBCompositor.zip Source Code https://github.com/toehead2001/pdn-rgb-compositor
  15. This is a very simple plugin originally intended to erase pixels in the canvas that don't match the clipboard, but extended so that it can optionally keep them instead. The clipboard image must be the same size as the canvas; otherwise, the effect does nothing. For no particularly good reason, other than I couldn't think of anything better, it's in the Color menu. The plugin: MismatchEraser.zip It's a CodLab plugin. Here is the source code:
  16. TechnoRobbo's Contour Filler V1.5.2 A gradient fill plugin that follows the contour of the Alpha Channel Make sure to deselect before using. Larger images take longer to render. Choose from smooth (zero slices) and stepped gradient Version 1.5.2 minor code cleanup Version 1.5.1 My apologies uploaded wrong version Version 1.5 has a smoothing component and new high speed code. Version 1.1 Updated for Paint.net 4.0 Menu: Effects -> Color Text Demo Quick Example on you Tube music by TechnoRobbo CHAPLIN Bogey1 https://www.dropbox.com/s/ioixkivgokaox9s/Bogart.png?raw=1 The VS Source Code The Plug-In TRsContourFiller.zip
  17. This plugin is like a more useful version of the color replacement tool. Whereas the standard tool merely paints over pixels if they're close enough to the secondary color, this plugin recolors every pixel a different amount based on how similar it is to the secondary color. For example I'll use this colorful image: Here's the built in tool replacing pink with cyan at about 30%: Notice the ugly, harsh edges and how some pinkish parts of the image are entirely untouched. Now my plugin replacing pink with cyan: No more ugly edges! My plugin changes all pixels of the image based on how similar each is to the secondary color. *Threshold changes how strongly pixels are recolored based on how similar they are to the secondary color *Roughness changes how quickly the recolor effect falls off after the threshold is passed when continuous replacement is selected. Lower values look 'nicer' but tend to give the image an overall tint *Continuous replacement recolors all pixels different amounts and looks really nice. Cutoff works similar to the normal tool as pixels over the threshold are not recolored at all - recolored pixels however are colored more 'accurately' than with the built-in tool. Note that this plugin works like the built-in tool inasmuch as the color used and the color replaced are the primary and secondary colors in the palette, respectively. advcolorrep.zip
  18. TechnoRobbo's Custom Palette Matcher v1.0.5 Conforms your image colors to your custom palette by finding the nearest color match. Version 1.0.5 Fixes Crash When No Palette Directory Exists Version 1.0.4 Browser system lets you sample palettes quickly. Version 1.03 add instant preview and interpolate option Update Version 1.0.2 Shows Transparency correctly in Palette Preview. Update Version 1.0.1 Allows manually created palettes(with errors) to be parsed and used. Manually created palettes should be loaded into PDN then saved again to correct the format. TR's Custom Palette Matcher will warn you of a bad palette but will try it's best to uses what it's given.. Menu: Effects->Color Video includes palettes posted by artists on this forum topic http://forums.getpaint.net/index.php?/topic/2947-color-palettes-go-here/?p=22185 Video Tutorial : New Browser The VS Source Code The Plugin TRsCustomPaletteMatch.zip
  19. This plugin has been updated by @Pratyush. Find the new version here Updated 9/10/2011: Right, it turns out that the original plug-in is no longer compatible with PDN. I fixed it, and also decided to make it open-source! This way I can take contributions to improve this, and maybe it will also help improve other plug-ins with this sort of alpha handling. The code is only a few lines of code long, but it uses (*gasp!*) MATH! Check it out if you're the coder type. The attached zip file includes both the DLL and source code (which you can open with CodeLab). Original post: Hi there! Long time lurker, first time poster. PDN has been my favorite graphics tool for quite some time. There's the old problem of recovering alpha information lost in compositing, for example when you *ahem* borrow images from the web. Say, smooth edge pixels on a black background; you'd prefer if they were transparent. A few plugins are available, and they do OK 90% of the time, but they fall short in recovering the original color information... See, it's not enough to figure out the alpha channel. You also have to use it to change the colors so they will look good when compositing again. Otherwise, there would be a visible halo (the color of the background) around the edge. AFAIK this happens with all existing plugins to eliminate backgrounds. So, I decided to make this one. I've got some pictures to demonstrate the effect and illustrate what I mean about the color correction GrimColorReaper.zip
  20. Change Extreme Colors From this to this What's this? I wanted a way to change the colors by selecting the extreme values (the darkest or the brightest). Here is the effect I just created for that. This plugin was made using CodeLab v3.2. Download it! Plugin ChangeExtremeColors.dll Here is the DLL http://jcljay.free.fr/pdn/ChangeExtremeColors.zip The MadJik's All plugins package is available! http://forums.getpaint.net/index.php?showtopic=7186 How to install Close Paint.net Classic version of Paint.net Unzip and (re)place the DLL in your Effect folder usually: C:/Program Files/Paint.NET/Effects (please reverse / for correct path) Microsoft Store version of Paint.net Unzip and (re)place the DLL in your Effect folder usually: My Documents/paint.net App Files/Effects (please reverse / for correct path) You have to adapt for your language My Documents How to use it This image is created to test the effect. I suggest you to copy and paste it in paint.net to run the plugin and get familiar with the settings. The sliders per channel define the range of colors to modify. And for each selected color you could increase/decrease with the amount for darkest or brightest. The range around 128 is just between darkest and brightest. Default values of the interface make no modification to the image. You have to change something. The User interface This plugin is added to the menu Effects, submenu Color. Limit for Red/Green/Blue Set the values per channel to define the range of colors to modify. Same values (Red) Checked by default. If checked the slider Red is used for all the sliders. Unchecked to be able to change Green and Blue. Dark Colors Checked by default. If checked the colors in the darkest range are modified. Dark adjustment Add/subtract the value to the colors in the darkest range are modified on each channel. Light Colors Checked by default. If checked the colors in the brightest range are modified. Light adjustment Add/subtract the value to the colors in the brightest range are modified on each channel. Average/Maximum of channels When “Same values” is checked the test of the color is made on the average of the channel or on the maximum value of each channel. Maximum is better for monochrome colors when one channel is 255 and others are 0. The Examples: Voilà! Enjoy! Let me see what you could do with it! update 2018-01-27 (thanks to @ReMake - Visual studio version - Linked sliders (instead greyed). - Translation to French and Russian
  21. TechnoRobbo's HDR-ish HDR style results - smooths out the transitions between light and dark. makes a dull picture less dull PDN 3.5 compatible (updated) Menu: Effects->Colors The Codelab Code Hidden Content: // Submenu: Color // Name: TR's HDR-ish // Title: TR's HDR-ish- v1.0 // Author: TechnoRobbo // URL: http://www.technorobbo #region UICode int Amount1 = 2; // [1,5] Intensity double Amount2 = 0; // [0,20] High Limit #endregion void Render(Surface dst, Surface src, Rectangle rect) { ColorBgra CP; int tmp =0; for (int y = rect.Top; y < rect.Bottom; y++) { for (int x = rect.Left; x < rect.Right; x++) { double accum = 0; double divider = 0; for (int i = 1 - Amount1 ;i <Amount1; i++) { for (int j = 1 - Amount1 ;j <Amount1; j++) { CP = src.GetBilinearSampleClamped(x + j,y + i); HsvColor hsv = HsvColor.FromColor(CP.ToColor()); accum += hsv.Value; divider++; } } CP = src[x,y]; HsvColor hsv2 = HsvColor.FromColor(CP.ToColor()); divider += Amount2; divider = (divider <= 1) ? 1 : divider; double newV = accum / divider; newV -= (1-hsv2.Value); newV = (newV < 0) ? 0 : (newV > 100) ? 100: newV; hsv2 = new HsvColor(hsv2.Hue,hsv2.Saturation,(int)newV); ColorBgra NP = ColorBgra.FromColor(hsv2.ToColor()); dst[x,y] = NP; } } } TRsHDRish.zip
  22. Hi again! And now my 2nd plugin: Selective Toning (to be found in the 'Color' submenu) User Interface: Demo: Just before posting I saw the similarity to the "Advanced Color Replacement" plugin. I still decided to post my one here, because it features some what more configuration possibilities, a blending mode selector and the possibility to use the alpha channel. The last feature enables one to use this plugin similarly like the great "Color to Alpha" plugin. This plugin is once again entirely written using the fantastic "Code Lab" plugin -- thank you, Bolt Bait! Downloads: https://www.dropbox.com/s/xi707rcu0qf57lv/Selective_toning_v1.0a.zip?dl=0 Source files (for programmers): https://www.dropbox.com/s/qtij2zk4ex20lit/Selective Toning v1.0a Source.zip?dl=0 Best regards, Philipp
  23. Hi everybody! After browsing for some plugins and finally taking a look at "Code Lab", I eventually decided to create my own plugin: (to be found in the "Color" submenu) *Updated V1.1* Blending Modes directly applicable Download: https://www.dropbox.com/s/o10l8o28xcc3n51/selective_enhancement_v1.1.zip?dl=0 Source code (for programmers): https://www.dropbox.com/s/dkf5x9ohhtchzvl/selective_enhancement_source_1_1.zip?dl=0 It will spread out or push together colors close to the selected one and was useful for some of my manipulations. The two following pictures show the effect. You can also get some nice contrast enhancement by choosing black as the base color something like ~-10 for the enhancement factor and some playing around with "Black (Input)" and "White (Input)". User Interface: Demo 1: Demo 2: (uses blend mode "color burn" and reduced "White (Output)" value) Demo 3: (in hints under "poppy effect" is explained how to get this) Hints on usage: * Basic idea: Select a color, slide enhancement slider and then slide input black and white sliders closer together * Tone an image: Select a color, slide enhancement slider to negative values. * Contrast enhancement: Select black or white and slide enhancement slider to negative values. If black is selected slide input white to the left, if white is selected slide input black to the left. * Contrast enhancement 2: Slide color to a medium grey and enhancement slider to positive values. Slide input black and white more towards the middle. * Some poppy effect: Select a saturated color opposite to the effect color you want. Slide enhancement to high values. * Blending: Play around with the output white slider, too. It has the analogue function for blending, as the slider in layer blending options. Outline of how it works: * Pixel RGB values are converted to double precision floating point values from 0.0 to 1.0 * Selected color is then subtracted, sign and value stored separately * A power function with exponent depending on the enhancement slider is applied. This pushes the pixel color towards or away from the selected color * The modified offset is applied to the selected base color * The input black and white values are used to cut out a range of colors and scale the to the output colors (like some basic histogram change), (conversion back to integer is performed afterwards!) * Output colors are blended to original image (if box is checked) I hope you like my first post, :wink: best regards, Philipp
  24. Description: This plugin removes a color from the selected part of the image and tries to find a substitution for it by analyzing the surrounding parts. Download: https://www.dropbox.com/s/exmcdhpt35e07j5/Kill_color_v1_1.zip?dl=0 Source code (for programmers): https://www.dropbox.com/s/wgaptwrkqyz68pf/Kill Color_source_v1_1.zip?dl=0 Changelog v 1.1: * BUGFIX: "Tone Amount" now working as supposed * New option "Keep only pixels that changed" added => very useful duplicate layer first, use plugin on new layer with this option checked * Source Code is now available * Tweaks in how "Tolerance" and "Tone Amount" are working. Screenshots: Example 1: (Parameters for this one: Color (R, G, : 190, 189, 187 (Picked with :ColorPicker: from the image first) Tolerance: 30 (for v1.1: maybe ~70) Tone Amount: 30 (for v1.1: 100, a bug was preventing toning in v1.0) Radius: 40 Precision: 20 Relevance of Proximity: 60 (Less blurry) Relevance of Colordifference: 60 Weight (Replacement): 40 Weight (Selection): 25 (Low saturation is more important than brightness) Assume Transparency: 0 (The fence is solid and has no blurred out edges) ) Example 2: (Properties for this example: Color (R, G, : 38, 127, 0 (Picked with :ColorPicker: from the image first) Tolerance: 0.01 (Just one color used) (still o.k. for v1.1) Tone Amount: 30 (would be 100 in v1.1 (toning was not working in v1.0)) Radius: 40 Precision: 20 Relevance of Proximity: 60 (Less blurry) Relevance of Colordifference: 60 Weight (Replacement): 50 Weight (Selection): 50 Assume Transparency: 0 (Splatters aren't transparent) ) User Interface: Hints on Usage: * Select a color first * Tone amount and tolerance let you control on how much the image is altered. A bigger tone amount causes similar color tones to be stronger affected. Tolerance defines a minimum change in the color so that the pixel is affected at all. * Radius and precision affect how many pixels in the surrounding of the altered pixel are used to estimate a replacement color. * Relevance of colordifference and proximity settings affect how the replacement color is estimated. A large value for the first one will give stronger weight to colors with a larger difference in color and intensity. Setting the second one to a larger value will give the direct surrounding a higher weight for the replacement color. * The weight (color <-> intensity) sliders influence what is considered more important as difference. 50 will give a balanced weight, 0 will just look at the tone and 100 at the lightness. The selection property influences which pixels are affected, the replacement option influences how the pixel in the surrounding (used for replacement) are weighted. * Assume transparency can be used if the surrounding is toned a bit with the color. * The "keep only pixel which are altered" option (v1.1, scroll down to see it) will only keep pixel that are affected by the algorithm. The remaining pixels are set as transparent. Also instead of toned pixel color, the alpha is set to a corresponding value. This makes it easier to modify the outcome in a second step afterwards. * The algorithm includes converting RGB values to CIELab values. This is time consuming and therefore the plugin tries to cache the whole image in CIELab values during initialization. If this is not possible (low on memory) the plugin will still work but get significantly slower. To speed up a bit aliasing will then be performed for RGB and one conversion with this bilinear sample will be used for calculation. If you remove the check from the checkbox you can set the plugin to do the aliasing after CIELab conversion. This will slow down the calculation with probably a factor two or three but the resulting image is identical to what you get, if caching were possible. Suggestions: * Duplicate the layer first and use the "keep only pixel which are altered" (since v1.1). Effects (like a Gaussian blur and correction of areas youd don't want to be affected, can than easily be achieved) * Don't increase radius too much if not necessary (e.g. for larger areas of the color you want to remove). The result will become much more blurry and it takes longer. * For images with low structure decrase the relevance of proximity and increase it if the altered parts look blurry. * If the replaced color has some strange toning you probably assumed too much (or less likely too few) transparency. * Play around with the two weighting sliders (and tone amount/tolerance, relevance of colordifference). I first tried it out at some selected parts of the image and afterwards applied the effect to the whole image. Technical Details: * CIELab is used to compare colors and calculate colors. Therefore the plugin tries to cache the image in CIELab format. * The color you want to kill is compared with the pixel colors. The difference in combination with the tone amount value determines the change of a pixel. If the difference is below the tolerance value (some scaling is involved here) the pixel will stay. * Precision and radius determine a number of pixels surrounding the pixel that should be changed. A weighted average of the color is determined. The weight is calculated from a distance factor, a color difference factor, and the alpha value. * The distance factor is something between one (relevance of proximity zero) and pow(distance,-3). (Calculation is discrete for speed reasons, no Math.Pow() involved) * The color difference factor is determined by difference(ColorToKill, ColorFromSurroundingPixel). Weight(color <-> intensity) and relevance of colordifference have an influence on this function. * The source is not documented and quite messy. If you are interested nevertheless just p.m. me. I plan to rework it a little and put it online later on. The source is now available. Grab it if you are intersted. Future plans: * Optimize the loop structure, for better memory access => increased speed. * Optimize the bilinear interpolation, that transparent pixel will be excluded already for the bilinear filtered values. * A CUDA implementation (seems to be possible from first tests, but will probably take some time for me to write it) Have fun, Philipp Schäfer
  25. Expand color What's this? This effect was a bonus in the bottom list of my pack of plugins. Now with the Russian version (thank you @ReMake) it is time to have its own post. This effect compare the colors of the canvas with the primary (PC) and the secondary (SC) colors. Based on the ratio of the gap the color will be replace either by PC, SC or unchanged. It could be useful to reduce the weight of the image (less colors) and to turn the image in bicolored picture. Just a tool for fun. Download it! Plugin ExpandColor.dll Here is the DLL http://jcljay.free.fr/pdn/ExpandColor.zip The MadJik's All plugins package is available! http://forums.getpaint.net/index.php?showtopic=7186 How to install Close Paint.net Classic version of Paint.net Unzip and (re)place the DLL in your Effect folder usually: C:/Program Files/Paint.NET/Effects Microsoft Store version of Paint.net Unzip and (re)place the DLL in your Effect folder usually: /My Documents/paint.net App Files/Effects/ You have to adapt for your language My Documents The User interface This plugin is added to the menu Effects, submenu Color. Tolerance mini/maxi Range between the source color must be to be replace. Check with primary/secondary color The source color is compared with PC, SC or both depending on these checkboxes. Invert changed colors The colors of replacement are PC and SC inverted. Apply on Color channel Unchecked color channel is preversed from any change. The Examples: Before (photo from my own stock) After Before After Voilà! Enjoy! Let me see what you could do with it!
  • Create New...