How to use new version of getresources().getColor : I am trying to get a color element using getresources.getColor(resource id) but android is telling me that it has been deprecated use getresources.getColor(resource id, theme). 

How do I tell it what theme to use? I have tried R.style.AppTheme but I get an error as this is an int value

        public class TodoListItemView extends AppCompatTextView {
    public TodoListItemView(Context context, AttributeSet attributeSet, int ds) {
        super(context, attributeSet, ds);
        init();
    }

    public TodoListItemView(Context context) {
        super(context);
        init();
    }

    public TodoListItemView(Context context, AttributeSet attributeSet) {
        super(context, attributeSet);
        init();
    }

    private Paint marginPaint;
    private Paint linePaint;
    private int paperColor;
    private float margin;

    private void init() {
        Resources myResources = getResources();

        marginPaint = new Paint(Paint.ANTI_ALIAS_FLAG);
       

 - marginPaint.setColor(getResources().getColor(R.color.notepad_margin));

        linePaint = new Paint(Paint.ANTI_ALIAS_FLAG);
  

 - linePaint.setColor(myResources.getColor(R.color.notepad_lines));

  

 - paperColor = myResources.getColor(R.color.notepad_paper);

        margin = myResources.getDimension(R.dimen.notepad_margin);
    }

    @Override
    public void onDraw(Canvas canvas) {
        canvas.drawColor(paperColor);

        canvas.drawLine(0, 0, getMeasuredHeight(), 0, linePaint);
        canvas.drawLine(0, getMeasuredHeight(), getMeasuredWidth(), getMeasuredHeight(), linePaint);

        canvas.drawLine(margin, 0, margin, getMeasuredHeight(), marginPaint);

        canvas.save();
        canvas.translate(margin, 0);

        super.onDraw(canvas);
        canvas.restore();
    }
}

Any help is greatly appreciated.