Skip to content

Color randomize doesn't consider original color for hue or lightness

Steps to reproduce:

  • open Inkscape
  • create 10 rectangles
  • select them
  • go to extension/ color/ randomize
  • set all sliders to 0
  • test every slider one by one, by raising it to 10%, leaving the rest at 0%

What happened?

  • hue slider starts alveys from red not original color
  • saturation slider works fine
  • lightness slider always starts from white , not original value

Version Info:

- Inkscape Version: 1.0
- Operating System: win 10
- Operating System version: ...

Old issue

This was fixed by 16d1fd1e

Following above steps, but trying with opacity, it either didn't do anything (see #236 (closed)), or had this error:

 Traceback (most recent call last):
   File "color_randomize.py", line 46, in <module>
     Randomize().run()
   File "C:\Program Files\Inkscape 1.0\share\inkscape\extensions\inkex\base.py", line 123, in run
     self.save_raw(self.effect())
   File "C:\Program Files\Inkscape 1.0\share\inkscape\extensions\inkex\extensions.py", line 252, in effect
     self.process_element(elem, gradients)
   File "C:\Program Files\Inkscape 1.0\share\inkscape\extensions\inkex\extensions.py", line 280, in process_element
     style[name] = self.modify_opacity(name, value)
   File "color_randomize.py", line 42, in modify_opacity
     return _rand(self.options.opacity_range, opacity, roof=100.0, method=uniform) / 100
   File "color_randomize.py", line 10, in _rand
     max_ = type(roof)((value * roof) + limit)
 TypeError: can't multiply sequence by non-int of type 'float'
Edited by Nathan Lee
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information