dopamine icon indicating copy to clipboard operation
dopamine copied to clipboard

[Enhancement] Dynamic Colors

Open DavidRLTG opened this issue 1 year ago • 5 comments

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.

DavidRLTG avatar Jan 13 '24 13:01 DavidRLTG

@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 avatar Jan 13 '24 14:01 digimezzo

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

DavidRLTG avatar Jan 13 '24 14:01 DavidRLTG

+1

saxophone-dev avatar Jan 21 '24 11:01 saxophone-dev

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);
  });

saxophone-dev avatar Jan 21 '24 11:01 saxophone-dev

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

digimezzo avatar Jan 22 '24 18:01 digimezzo