gradle-mdicons icon indicating copy to clipboard operation
gradle-mdicons copied to clipboard

Problem with colors

Open djimondev opened this issue 9 years ago • 3 comments

I can use the lib easily but it seems that colours doesn't work. This is my config :

mdicons { // icons at http://google.github.io/material-design-icons/ asset name: "user", color: "red", size: "18dp" asset name: ["account.*", "cloud.upload"], color: ["grey600", "black", "white"], size: ["18dp", "24dp"] }

I only get white and black icons.

djimondev avatar May 23 '15 15:05 djimondev

Hmm, what is your environment? To get color icons, ImageMagick is needed. In my environment, I could get also grey600 icons.

with this configuration (I added plugin settings as the same to you),

apply plugin: 'com.android.application'
apply plugin: 'com.tmiyamon.mdicons'

android {
    compileSdkVersion 22
    buildToolsVersion "22.0.1"

    defaultConfig {
        applicationId "com.tmiyamon.myapplication"
        minSdkVersion 15
        targetSdkVersion 22
        versionCode 1
        versionName "1.0"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    compile 'com.android.support:appcompat-v7:22.1.1'
}

mdicons {
    // icons at http://google.github.io/material-design-icons/
    asset name: "user", color: "red", size: "18dp"
    asset name: ["account.*", "cloud.upload"], color: ["grey600", "black", "white"], size: ["18dp", "24dp"]
}

result in

screen shot 2015-05-24 at 1 22 46 am

tmiyamon avatar May 23 '15 16:05 tmiyamon

I am under Mac OSX, i think this is the problem effectively... I will try to fix and post then. Many thanks

djimondev avatar May 30 '15 08:05 djimondev

I have a similar issue:

could not generate grey600 icon from MaterialDesignIcons$Icon(category=action,density=mdpi,name=ic_delete,color=white,size=24dp,ext=png) caused by java.lang.Exception: Required convert but not found in [/usr/bin, /usr/local/bin].

convert is already on my PATH in /opt/local/bin/convert installed by MacPorts.

So the question might be "How do we change the PATH mdicons uses to find convert?".

dantman avatar Aug 26 '15 21:08 dantman