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

[Enhancement] Dynamic Colors #551

Closed
DavidRLTG opened this issue Jan 13, 2024 · 5 comments · Fixed by #629
Closed

[Enhancement] Dynamic Colors #551

DavidRLTG opened this issue Jan 13, 2024 · 5 comments · Fixed by #629
Labels
enhancement New feature or request

Comments

@DavidRLTG
Copy link

image

Image attached, An example of how it could look via the Beats theme and a fitting song.

I think it would be really cool if the app colors changed depending on the album cover of the song playing.
Makes it more immersive, I guess.

@digimezzo
Copy link
Owner

@DavidRLTG That's a great idea! I'm adding this as a feature request. Oh by the way, I see in your screenshot that the scroll bars are blue, despite setting the Beats theme. That's a know issue. I made a small mistake in the last preview. This will be fixed in the next preview.

@digimezzo digimezzo added the enhancement New feature or request label Jan 13, 2024
@digimezzo digimezzo added this to the Dopamine 3.0 Preview 25 milestone Jan 13, 2024
@DavidRLTG
Copy link
Author

Thanks fella :)
And aye, good luck with fixing the issue!!

@saxophone-dev
Copy link

+1

@saxophone-dev
Copy link

saxophone-dev commented Jan 21, 2024

I might make a PR.
A possible way to do this is to use node-vibrant. An example:

const Vibrant = require('node-vibrant');

async function getAccentColor(imagePath) {
  try {
    const palette = await Vibrant.from(imagePath).getPalette();
    
    const accentColor = palette.Vibrant.getHex();

    return accentColor;
  } catch (error) {
    console.error('Error extracting accent color:', error.message);
    return null;
  }
}

// Example usage:
const imagePath = 'path/to/your/image.jpg';

getAccentColor(imagePath)
  .then((accentColor) => {
    if (accentColor) {
      console.log('Accent Color:', accentColor);
    } else {
      console.log('Unable to extract accent color.');
    }
  })
  .catch((error) => {
    console.error('Error:', error);
  });

@digimezzo
Copy link
Owner

@TheBeeBoi Sounds great! I'm not working on this feature yet, so feel free to create a PR. I'll gladly review it.

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

Successfully merging a pull request may close this issue.

3 participants