Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add CSS4() and JSON() methods to Palette. #5

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

dayvonjersen
Copy link
Owner

@dayvonjersen dayvonjersen commented Jun 12, 2023

  • coming back to this project after 7 (SEVEN) years! what a rush!
  • some background: I originally made this port from Java so I could use it in the production of another project that has been one false start after the next since 2009. I'm back on my BS and trying it one more time™ anyway after having to use this library in my own code I realized it wasnt' outputting what I want/needed to use it. I needed JSON to store it in the DB, CSS4 vars to use in the UI and 16 bit colors as integers to do image fills with the image package in stdlib
  • this comes up short of an ideal solution however and isn't as flexible as it should be yet but it's one small step in that direction
  • feedback and contributions welcome!!!
  • happy hacking, -Dave, from NJ Sun 11 Jun 2023 11:24:03 PM EDT

https://pbs.twimg.com/media/FyZD6d3XgAAVBKz?format=jpg&name=large <- screenshot of it working, can I post images on github why not

 - coming back to this project after 7 (SEVEN) years! what a rush!
 - some background: I originally made this port from Java so I could use
   it in the production of another project that has been one false start
   after the next since 2009. I'm back on my BS and trying it one more timeة
   anyway after having to use this library in my own code I realized it
   wasnt' outputting what I want/needed to use it. I needed JSON to
   store it in the DB, CSS4 vars to use in the UI and 16 bit colors as
   integers to do image fills with the image package in stdlib
 - this comes up short of an ideal solution however and isn't as
 flexible as it should be yet but it's one small step in that direction
 - feedback and contributions welcome!!!
 - happy hacking, -Dave, from NJ Sun 11 Jun 2023 11:24:03 PM EDT
@dayvonjersen
Copy link
Owner Author

I didn't check if ExtractAwesome() re-runs the algorithm that finds the swatches every time if so this could get very expensive indeed should refactor to cache the result once and render as JSON, CSS, CSV, or whatever else people might want
-day

@@ -17,6 +18,7 @@ import (
"io"
"log"
"net/http"
"sorbet/vibrant"
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I knew there was a reason to check the diff. Have to add a go.mod file or merge #4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant