Skip to content
Snippets Groups Projects
Unverified Commit 5eec8966 authored by syuilo's avatar syuilo
Browse files

Better avgColor

parent 17f35174
No related branches found
No related tags found
No related merge requests found
......@@ -121,7 +121,7 @@ export default Vue.extend({
if (this.file.properties.avgColor) {
anime({
targets: this.$refs.thumbnail,
backgroundColor: this.file.properties.avgColor.replace('255)', '0)'),
backgroundColor: 'transparent', // TODO fade
duration: 100,
easing: 'linear'
});
......
......@@ -142,7 +142,7 @@ export default Vue.extend({
if (this.file.properties.avgColor) {
anime({
targets: this.$refs.thumbnail,
backgroundColor: this.file.properties.avgColor.replace('255)', '0)'),
backgroundColor: 'transparent', // TODO fade
duration: 100,
easing: 'linear'
});
......
......@@ -363,9 +363,7 @@ export default async function(
logger.debug(`average color is calculated: ${r}, ${g}, ${b}`);
const value = info.isOpaque ? `rgba(${r},${g},${b},0)` : `rgba(${r},${g},${b},255)`;
properties['avgColor'] = value;
properties['avgColor'] = `rgb(${r},${g},${b})`;
} catch (e) { }
};
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment