calculating color matrix filter manually (solves isssue #750)