dopamine
dopamine copied to clipboard
[Enhancement] Dynamic Colors
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 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.
Thanks fella :) And aye, good luck with fixing the issue!!
+1
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);
});
@TheBeeBoi Sounds great! I'm not working on this feature yet, so feel free to create a PR. I'll gladly review it.