Wand color() function in Python Last Updated : 16 Mar, 2023 Comments Improve Suggest changes Like Article Like Report color() function draws a color on the image using current fill color, starting at specified position & method. Uses same arguments as color() method. Following are PAINT_METHOD_TYPES. 'point' alters a single pixel.'replace' swaps on color for another. Threshold is influenced by fuzz.'floodfill' fills area of a color influenced by fuzz.'filltoborder' fills area of a color until border defined by border_color.'reset' replaces the whole image to a single color. Syntax : wand.drawing.color(x, y, method) Parameters : ParameterInput TypeDescriptionxnumbers.Integerstart of filling colorynumbers.Integerend of filling colormethodbasestringmethod from PAINT_METHOD_TYPES Example #1: Python3 # Import required objects from wand modules from wand.image import Image from wand.drawing import Drawing from wand.color import Color # generate object for wand.drawing with Drawing() as draw: draw.fill_color = Color('green') draw.color(100, 100, 'point') with Image(width = 200, height = 200, background = Color('white')) as img: # draw shape on image using draw() function draw.draw(img) img.save(filename ='color.png') Output: A green pixel is visible at center of transparent image here is the zoomed image. Example #2: Filling color using flood-fill algorithm. Python3 # Import required objects from wand modules from wand.image import Image from wand.drawing import Drawing from wand.color import Color # generate object for wand.drawing with Drawing() as draw: draw.fill_color = Color('blue') draw.alpha(10, 35, 'floodfill') with Image(width = 200, height = 200, background = Color('white')) as img: # draw shape on image using draw() function draw.draw(img) img.save(filename ='color2.png') Output: Comment More infoAdvertise with us Next Article Wand color() function in Python R RahulSabharwal Follow Improve Article Tags : Python Python-wand Practice Tags : python Similar Reads Wand - blur() function in Python Blurring Image means making an image fuzzy or hazy. A blur image is indefinite and it is unable to see an image clearly. Blur is of many types, like - Adaptive blur, Gaussian blur, Selective Blur etc. In order to blur an image we use blur() function. blur() function takes three arguments. Example : 2 min read Wand flop() function in Python In this article we will learn what is flop() function. Basically this function returns a flipped image. Flop effect flops an image upside-down or creates an vertical reflection of image. No arguments are needed in this function. Syntax : wand.image.flop()Parameters : No Parameters in flop() function 1 min read Wand arc() function in Python arc() is a function present in wand.drawing module. arc() function draws an arc in the image. Youâll need to define three pairs of (x, y) coordinates. First & second pair of coordinates will be the minimum bounding rectangle, and the last pair define the starting & ending degree. Syntax : wa 2 min read Wand circle() function in Python The circle() function is another Drawing function in Wand. This method is used to draw a circle in the image. It requires only two arguments that are origin and perimeter of the circle. Syntax: wand.drawing.circle(origin, perimeter)Â Parameters : ParameterInput TypeDescriptionorigin(collections.abc. 2 min read Wand flip() function in Python In this article we will learn what is flip() function. Basically this function returns a flipped image. Flip effect flips an image upside-down or creates an vertical reflection of image. No arguments are needed in this function. Syntax : wand.image.flip()Parameters : No Parameters in flip() function 1 min read Like