[Script] More Color Shading Options!

Happy it helps!! The latest version of the script should be working properly in 1.2.18.

Let me know if you are having troubles or think it’s missing certain new features! :slight_smile:

when I try to open the script I get this message

:frowning:

1 Like

Hmm. It looks like maybe some extra letters/symbols got copied over into your file. I’m using macOS as well, and not getting that line ‘<’ symbol on line 7 error.

I would delete it from the Aesprite scripts folder, and then try using the raw download link to grab the .lua file again: https://raw.githubusercontent.com/dominickjohn/aseprite/master/Color%20Shading.lua

You could also try manually copy/pasting the code from the link above. If you still have troubles let me know!

3 Likes

Maybe your script was suffering from jpeg artifacting. Always export to png! :wink:

1 Like

@domjohn Great Script, do you permit me to use your code? I am working on a script project for Surface Go PC\Tablet users. I will write your name in the Special thank section.

This is script is so useful, thanks again.
I’m trying to add a little feature to this script. I’d like every RGB output to be multiples of 8.
So the little swatches of color of the shading/lightness/saturation/hue would be colors composed of multiples of 8 (8 16 32 40…).

wow, i choose Pyxel edit over aseprite only for this feature. Love it, back to Aseprite now :slight_smile:

Script has been updated so that right clicks will set background color on the main Aseprite palette. Also added a middle click to regenerate the shading palette based on whatever is clicked.

Hope this helps speed things up! :slight_smile:

1 Like

Thank you so mucho for this script! I was missing this feature from pyxel edit, now I feel at home in Aseprite.

1 Like

So i got this problem…

Try downloading the file in raw form here: https://raw.githubusercontent.com/dominickjohn/aseprite/master/Color%20Shading.lua

Or, copy/paste from that raw link instead. Sometimes bringing things over from code view on GitHub can have weird effects and bring in extra/missing text.

1 Like

Thank you! This is everyone needs. :smiley: I wonder why this not implemented in the main system.

1 Like

You rocks Domjohn. Thanks !

1 Like

Updated hue generation - it was bugging out on the endpoints of the color wheel. Thanks to Jeremy B. for spotting and providing the solution for that!

I’ve also updated the install instructions, apparently “save file as” was causing it to be stored as an HTML file in certain cases. Thus solving the mysterious ‘<’ bug after all this time :upside_down_face:

2 Likes

@domjohn Amazing work on the script and keeping it updated. I had previously modified an older version of the script to make a second version where the “get” button was mapped to the BG color instead of the FG (because I didn’t yet know how to find the different mousebutton events lol). Instead of splitting it into two copies of the same thing, would it be possible to add a second button next to get, and have one say “Get FG” and the other say and do “Get BG”? I realize it’s kind of a non-issue as it’s still possible to Swap Colors while the window is open and hit Get again, but it would be more intuitive in the UI at least to have the option.

1 Like

@Brandon_Graham Thanks! I totally see what you mean, this definitely adds to usability. Oddly, regular buttons don’t have a way to tell which mouse button is clicked, but I played around with some concepts and came up with something I think you’ll really like. Newest version is up on GitHub if you wanna give it a try :slight_smile:

** UPDATE: v2.0 - 5/12/21 **

  • Get button now stores both foreground and background color
  • Added background choice to base color picker
  • User can now click to switch between generated base color palettes
  • Fixed dialogue window resizing bug
2 Likes

Wow, I love this new version! Great work, thanks so much!

1 Like

@domjohn Somehow your script doesn’t work properly in beta (1.3). I don’t know why, but dlg.bounds.x and dlg.bounds.y are zero, so dialog is created at (0, 0). As possible workaround - edit existing dlg, not create new. Is it possible and can i help you?
image

1 Like

I have a very hacky workaround for now: change the very last dlg:show at the end of the script to include your preferred coordinates:
image

1 Like

Thanks for bringing this to my attention! I don’t believe there’s a function to refresh an existing dialogue window, but having that command in API would be amazing. What I’ve done is just pass along the current bounds and do an close/open to mimic that, but it looks like we’ve lost a way to get the current coords of the window.

@dacap I ran a few more tests in the 1.3 beta and it looks like we’ve lost dialogue bounds functionality in the scripting API (it always returns x and y as zero). Unless I’m missing something?

3 Likes